diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:17:33 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:17:33 +0000 |
commit | 806aeb954d302328cc75bda71331474d8634675b (patch) | |
tree | 9565300c48ab1ea34b66624222ef979734f68b00 /chrome/browser/views/jsmessage_box_dialog.cc | |
parent | 8f0a23470f47090c601078952b77c5b520c595c2 (diff) | |
download | chromium_src-806aeb954d302328cc75bda71331474d8634675b.zip chromium_src-806aeb954d302328cc75bda71331474d8634675b.tar.gz chromium_src-806aeb954d302328cc75bda71331474d8634675b.tar.bz2 |
Refactor DialogDelegate so the DialogButton enum is in cross platform
code.
This is mostly a find & replace in our code to use the new location
of the enum.
I also deleted some GetDialogButtons methods in child classes
because they were identical to the parent version in DialogDelegate.
This will allow more code to be enabled on linux/mac in the
automation provider.
Review URL: http://codereview.chromium.org/88008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/jsmessage_box_dialog.cc')
-rw-r--r-- | chrome/browser/views/jsmessage_box_dialog.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/views/jsmessage_box_dialog.cc b/chrome/browser/views/jsmessage_box_dialog.cc index bd0c7f2..028d46b 100644 --- a/chrome/browser/views/jsmessage_box_dialog.cc +++ b/chrome/browser/views/jsmessage_box_dialog.cc @@ -60,10 +60,10 @@ void JavascriptMessageBoxDialog::CloseModalDialog() { int JavascriptMessageBoxDialog::GetDialogButtons() const { int dialog_buttons = 0; if (parent_->dialog_flags() & MessageBox::kFlagHasOKButton) - dialog_buttons = DIALOGBUTTON_OK; + dialog_buttons = MessageBox::DIALOGBUTTON_OK; if (parent_->dialog_flags() & MessageBox::kFlagHasCancelButton) - dialog_buttons |= DIALOGBUTTON_CANCEL; + dialog_buttons |= MessageBox::DIALOGBUTTON_CANCEL; return dialog_buttons; } @@ -96,11 +96,11 @@ bool JavascriptMessageBoxDialog::Accept() { } std::wstring JavascriptMessageBoxDialog::GetDialogButtonLabel( - DialogButton button) const { + MessageBox::DialogButton button) const { if (parent_->is_before_unload_dialog()) { - if (button == DialogDelegate::DIALOGBUTTON_OK) { + if (button == MessageBox::DIALOGBUTTON_OK) { return l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL); - } else if (button == DialogDelegate::DIALOGBUTTON_CANCEL) { + } else if (button == MessageBox::DIALOGBUTTON_CANCEL) { return l10n_util::GetString( IDS_BEFOREUNLOAD_MESSAGEBOX_CANCEL_BUTTON_LABEL); } |