Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5022)

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 63033: Refactor AppModalDialogQueue and move JS Alert boxes into a MVC. (Closed)
Patch Set: whitespace Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/app_modal_dialog_win.cc ('k') | chrome/browser/browser.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider.cc
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 37e7b7e7221b1182cea9dabf795acb3e333f9d8b..2d73a9c2a90380bf726b195162178ac0159f1673 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -9,6 +9,7 @@
#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/browser/app_modal_dialog.h"
#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/automation/url_request_failed_dns_job.h"
#include "chrome/browser/automation/url_request_mock_http_job.h"
@@ -43,7 +44,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/app_modal_dialog_delegate.h"
+#include "chrome/views/window/dialog_delegate.h"
#include "chrome/views/window/window.h"
#endif // defined(OS_WIN)
@@ -1227,8 +1228,7 @@ void AutomationProvider::GetBrowserWindowCount(int* window_count) {
// TODO(port): Enable when dialog delegate is ported.
void AutomationProvider::GetShowingAppModalDialog(bool* showing_dialog,
int* dialog_button) {
- views::AppModalDialogDelegate* dialog_delegate =
- AppModalDialogQueue::active_dialog();
+ AppModalDialog* dialog_delegate = AppModalDialogQueue::active_dialog();
*showing_dialog = (dialog_delegate != NULL);
if (*showing_dialog)
*dialog_button = dialog_delegate->GetDialogButtons();
@@ -1239,21 +1239,18 @@ void AutomationProvider::GetShowingAppModalDialog(bool* showing_dialog,
void AutomationProvider::ClickAppModalDialogButton(int button, bool* success) {
*success = false;
- views::AppModalDialogDelegate* dialog_delegate =
- AppModalDialogQueue::active_dialog();
+ AppModalDialog* dialog_delegate = AppModalDialogQueue::active_dialog();
if (dialog_delegate &&
(dialog_delegate->GetDialogButtons() & button) == button) {
- views::DialogClientView* client_view =
- dialog_delegate->window()->GetClientView()->AsDialogClientView();
if ((button & views::DialogDelegate::DIALOGBUTTON_OK) ==
views::DialogDelegate::DIALOGBUTTON_OK) {
- client_view->AcceptWindow();
+ dialog_delegate->AcceptWindow();
*success = true;
}
if ((button & views::DialogDelegate::DIALOGBUTTON_CANCEL) ==
views::DialogDelegate::DIALOGBUTTON_CANCEL) {
DCHECK(!*success) << "invalid param, OK and CANCEL specified";
- client_view->CancelWindow();
+ dialog_delegate->CancelWindow();
*success = true;
}
}
« no previous file with comments | « chrome/browser/app_modal_dialog_win.cc ('k') | chrome/browser/browser.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698