Commit 16ade064 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Remove GetAppModalDialogButtons.

It's unused.

Bug: none
Change-Id: Ic080066b9502f834a5f77abdffe53a5967c8e79b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972457Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726013}
parent b0dce55e
...@@ -36,11 +36,6 @@ JavascriptAppModalDialogAndroid::JavascriptAppModalDialogAndroid( ...@@ -36,11 +36,6 @@ JavascriptAppModalDialogAndroid::JavascriptAppModalDialogAndroid(
parent_jobject_weak_ref_(env, parent->GetJavaObject().obj()) { parent_jobject_weak_ref_(env, parent->GetJavaObject().obj()) {
} }
int JavascriptAppModalDialogAndroid::GetAppModalDialogButtons() const {
NOTIMPLEMENTED();
return 0;
}
void JavascriptAppModalDialogAndroid::ShowAppModalDialog() { void JavascriptAppModalDialogAndroid::ShowAppModalDialog() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/android/scoped_java_ref.h" #include "base/android/scoped_java_ref.h"
#include "base/macros.h" #include "base/macros.h"
#include "components/app_modal/native_app_modal_dialog.h" #include "components/app_modal/native_app_modal_dialog.h"
#include "ui/gfx/native_widget_types.h"
namespace app_modal { namespace app_modal {
class JavaScriptAppModalDialog; class JavaScriptAppModalDialog;
...@@ -25,7 +26,6 @@ class JavascriptAppModalDialogAndroid ...@@ -25,7 +26,6 @@ class JavascriptAppModalDialogAndroid
gfx::NativeWindow parent); gfx::NativeWindow parent);
// NativeAppModalDialog: // NativeAppModalDialog:
int GetAppModalDialogButtons() const override;
void ShowAppModalDialog() override; void ShowAppModalDialog() override;
void ActivateAppModalDialog() override; void ActivateAppModalDialog() override;
void CloseAppModalDialog() override; void CloseAppModalDialog() override;
......
...@@ -28,7 +28,6 @@ class JavaScriptAppModalDialogCocoa : public app_modal::NativeAppModalDialog { ...@@ -28,7 +28,6 @@ class JavaScriptAppModalDialogCocoa : public app_modal::NativeAppModalDialog {
app_modal::JavaScriptAppModalDialog* dialog); app_modal::JavaScriptAppModalDialog* dialog);
// Overridden from NativeAppModalDialog: // Overridden from NativeAppModalDialog:
int GetAppModalDialogButtons() const override;
void ShowAppModalDialog() override; void ShowAppModalDialog() override;
void ActivateAppModalDialog() override; void ActivateAppModalDialog() override;
void CloseAppModalDialog() override; void CloseAppModalDialog() override;
......
...@@ -118,20 +118,6 @@ void JavaScriptAppModalDialogCocoa::OnMojoDisconnect() { ...@@ -118,20 +118,6 @@ void JavaScriptAppModalDialogCocoa::OnMojoDisconnect() {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// JavaScriptAppModalDialogCocoa, NativeAppModalDialog implementation: // JavaScriptAppModalDialogCocoa, NativeAppModalDialog implementation:
int JavaScriptAppModalDialogCocoa::GetAppModalDialogButtons() const {
// From the above, it is the case that if there is 1 button, it is always the
// OK button. The second button, if it exists, is always the Cancel button.
switch (num_buttons_) {
case 1:
return ui::DIALOG_BUTTON_OK;
case 2:
return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
default:
NOTREACHED();
return 0;
}
}
void JavaScriptAppModalDialogCocoa::ShowAppModalDialog() { void JavaScriptAppModalDialogCocoa::ShowAppModalDialog() {
is_showing_ = true; is_showing_ = true;
......
...@@ -5,19 +5,12 @@ ...@@ -5,19 +5,12 @@
#ifndef COMPONENTS_APP_MODAL_NATIVE_APP_MODAL_DIALOG_H_ #ifndef COMPONENTS_APP_MODAL_NATIVE_APP_MODAL_DIALOG_H_
#define COMPONENTS_APP_MODAL_NATIVE_APP_MODAL_DIALOG_H_ #define COMPONENTS_APP_MODAL_NATIVE_APP_MODAL_DIALOG_H_
#include "ui/gfx/native_widget_types.h"
namespace app_modal { namespace app_modal {
class NativeAppModalDialog { class NativeAppModalDialog {
public: public:
virtual ~NativeAppModalDialog() {} virtual ~NativeAppModalDialog() {}
// Returns the buttons to be shown. See ui::DialogButton for which buttons can
// be returned.
virtual int GetAppModalDialogButtons() const = 0;
// Shows the dialog. // Shows the dialog.
virtual void ShowAppModalDialog() = 0; virtual void ShowAppModalDialog() = 0;
......
...@@ -60,10 +60,6 @@ JavaScriptAppModalDialogViews::~JavaScriptAppModalDialogViews() { ...@@ -60,10 +60,6 @@ JavaScriptAppModalDialogViews::~JavaScriptAppModalDialogViews() {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// JavaScriptAppModalDialogViews, NativeAppModalDialog implementation: // JavaScriptAppModalDialogViews, NativeAppModalDialog implementation:
int JavaScriptAppModalDialogViews::GetAppModalDialogButtons() const {
return GetDialogButtons();
}
void JavaScriptAppModalDialogViews::ShowAppModalDialog() { void JavaScriptAppModalDialogViews::ShowAppModalDialog() {
GetWidget()->Show(); GetWidget()->Show();
} }
......
...@@ -26,7 +26,6 @@ class JavaScriptAppModalDialogViews : public NativeAppModalDialog, ...@@ -26,7 +26,6 @@ class JavaScriptAppModalDialogViews : public NativeAppModalDialog,
~JavaScriptAppModalDialogViews() override; ~JavaScriptAppModalDialogViews() override;
// Overridden from NativeAppModalDialog: // Overridden from NativeAppModalDialog:
int GetAppModalDialogButtons() const override;
void ShowAppModalDialog() override; void ShowAppModalDialog() override;
void ActivateAppModalDialog() override; void ActivateAppModalDialog() override;
void CloseAppModalDialog() override; void CloseAppModalDialog() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment