diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:31:47 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:31:47 +0000 |
commit | 7f1a907d93ee0f7ac527424a70e245343ce0539a (patch) | |
tree | f2676a17b23d23c9c044dd64bde0b6601dc256d1 /chrome/browser/automation | |
parent | 806aeb954d302328cc75bda71331474d8634675b (diff) | |
download | chromium_src-7f1a907d93ee0f7ac527424a70e245343ce0539a.zip chromium_src-7f1a907d93ee0f7ac527424a70e245343ce0539a.tar.gz chromium_src-7f1a907d93ee0f7ac527424a70e245343ce0539a.tar.bz2 |
Revert "Refactor DialogDelegate so the DialogButton enum is in cross platform"
This reverts commit r14146.
MessageBox is redefined to MessageBoxW by windows. I need to rename the
class.
Review URL: http://codereview.chromium.org/87064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 02a0a9e..8383feb 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -28,7 +28,6 @@ #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" #include "chrome/common/chrome_paths.h" -#include "chrome/common/message_box_flags.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/platform_util.h" #include "chrome/common/pref_service.h" @@ -47,6 +46,7 @@ #include "chrome/browser/printing/print_job.h" #include "chrome/browser/views/bookmark_bar_view.h" #include "chrome/browser/views/location_bar_view.h" +#include "chrome/views/window/dialog_delegate.h" #include "chrome/views/window/window.h" #endif // defined(OS_WIN) @@ -1297,6 +1297,9 @@ void AutomationProvider::GetBrowserWindowCount(int* window_count) { *window_count = static_cast<int>(BrowserList::size()); } +#if defined(OS_WIN) +// TODO(port): Move the views::DialogDelegate::DialogButton enum out into a +// common place then remove the OS_WIN guard. void AutomationProvider::GetShowingAppModalDialog(bool* showing_dialog, int* dialog_button) { AppModalDialog* dialog_delegate = AppModalDialogQueue::active_dialog(); @@ -1304,7 +1307,7 @@ void AutomationProvider::GetShowingAppModalDialog(bool* showing_dialog, if (*showing_dialog) *dialog_button = dialog_delegate->GetDialogButtons(); else - *dialog_button = MessageBox::DIALOGBUTTON_NONE; + *dialog_button = views::DialogDelegate::DIALOGBUTTON_NONE; } void AutomationProvider::ClickAppModalDialogButton(int button, bool* success) { @@ -1313,19 +1316,20 @@ void AutomationProvider::ClickAppModalDialogButton(int button, bool* success) { AppModalDialog* dialog_delegate = AppModalDialogQueue::active_dialog(); if (dialog_delegate && (dialog_delegate->GetDialogButtons() & button) == button) { - if ((button & MessageBox::DIALOGBUTTON_OK) == - MessageBox::DIALOGBUTTON_OK) { + if ((button & views::DialogDelegate::DIALOGBUTTON_OK) == + views::DialogDelegate::DIALOGBUTTON_OK) { dialog_delegate->AcceptWindow(); *success = true; } - if ((button & MessageBox::DIALOGBUTTON_CANCEL) == - MessageBox::DIALOGBUTTON_CANCEL) { + if ((button & views::DialogDelegate::DIALOGBUTTON_CANCEL) == + views::DialogDelegate::DIALOGBUTTON_CANCEL) { DCHECK(!*success) << "invalid param, OK and CANCEL specified"; dialog_delegate->CancelWindow(); *success = true; } } } +#endif void AutomationProvider::GetBrowserWindow(int index, int* handle) { *handle = 0; |