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

Unified Diff: chrome/browser/app_modal_dialog_win.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_queue.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog_win.cc
diff --git a/chrome/browser/app_modal_dialog_win.cc b/chrome/browser/app_modal_dialog_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d0dac3505cbce681b229320e3caa1c532e6e01ae
--- /dev/null
+++ b/chrome/browser/app_modal_dialog_win.cc
@@ -0,0 +1,44 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/app_modal_dialog.h"
+
+#include "base/logging.h"
+#include "chrome/browser/views/jsmessage_box_dialog.h"
+#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/views/window/window.h"
+
+AppModalDialog::~AppModalDialog() {
+}
+
+void AppModalDialog::CreateAndShowDialog() {
+ dialog_ = new JavascriptMessageBoxDialog(this, message_text_,
+ default_prompt_text_, display_suppress_checkbox_);
+ DCHECK(dialog_->IsModal());
+ dialog_->ShowModalDialog();
+}
+
+void AppModalDialog::ActivateModalDialog() {
+ dialog_->ActivateModalDialog();
+}
+
+void AppModalDialog::CloseModalDialog() {
+ dialog_->CloseModalDialog();
+}
+
+int AppModalDialog::GetDialogButtons() {
+ return dialog_->GetDialogButtons();
+}
+
+void AppModalDialog::AcceptWindow() {
+ views::DialogClientView* client_view =
+ dialog_->window()->GetClientView()->AsDialogClientView();
+ client_view->AcceptWindow();
+}
+
+void AppModalDialog::CancelWindow() {
+ views::DialogClientView* client_view =
+ dialog_->window()->GetClientView()->AsDialogClientView();
+ client_view->CancelWindow();
+}
« no previous file with comments | « chrome/browser/app_modal_dialog_queue.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698