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/test/automation/automation_proxy.cc | |
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/test/automation/automation_proxy.cc')
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index fac5001..5715aac 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -318,9 +318,11 @@ bool AutomationProxy::WaitForWindowCountToBecome(int count, return false; } +#if defined(OS_WIN) +// TODO(port): Port when DialogDelegate is ported. bool AutomationProxy::GetShowingAppModalDialog( bool* showing_app_modal_dialog, - MessageBox::DialogButton* button) { + views::DialogDelegate::DialogButton* button) { if (!showing_app_modal_dialog || !button) { NOTREACHED(); return false; @@ -336,12 +338,12 @@ bool AutomationProxy::GetShowingAppModalDialog( return false; } - *button = static_cast<MessageBox::DialogButton>(button_int); + *button = static_cast<views::DialogDelegate::DialogButton>(button_int); return true; } bool AutomationProxy::ClickAppModalDialogButton( - MessageBox::DialogButton button) { + views::DialogDelegate::DialogButton button) { bool succeeded = false; if (!SendWithTimeout( @@ -359,7 +361,8 @@ bool AutomationProxy::WaitForAppModalDialog(int wait_timeout) { const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout); while (TimeTicks::Now() - start < timeout) { bool dialog_shown = false; - MessageBox::DialogButton button = MessageBox::DIALOGBUTTON_NONE; + views::DialogDelegate::DialogButton button = + views::DialogDelegate::DIALOGBUTTON_NONE; bool succeeded = GetShowingAppModalDialog(&dialog_shown, &button); if (!succeeded) { // Try again next round, but log it. @@ -367,11 +370,12 @@ bool AutomationProxy::WaitForAppModalDialog(int wait_timeout) { } else if (dialog_shown) { return true; } - PlatformThread::Sleep(automation::kSleepTime); + Sleep(automation::kSleepTime); } // Dialog never shown. return false; } +#endif // defined(OS_WIN) bool AutomationProxy::WaitForURLDisplayed(GURL url, int wait_timeout) { const TimeTicks start = TimeTicks::Now(); |