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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/app_modal_dialog.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/views/jsmessage_box_dialog.h"
9 #include "chrome/browser/tab_contents/web_contents.h"
10 #include "chrome/views/window/window.h"
11
12 AppModalDialog::~AppModalDialog() {
13 }
14
15 void AppModalDialog::CreateAndShowDialog() {
16 dialog_ = new JavascriptMessageBoxDialog(this, message_text_,
17 default_prompt_text_, display_suppress_checkbox_);
18 DCHECK(dialog_->IsModal());
19 dialog_->ShowModalDialog();
20 }
21
22 void AppModalDialog::ActivateModalDialog() {
23 dialog_->ActivateModalDialog();
24 }
25
26 void AppModalDialog::CloseModalDialog() {
27 dialog_->CloseModalDialog();
28 }
29
30 int AppModalDialog::GetDialogButtons() {
31 return dialog_->GetDialogButtons();
32 }
33
34 void AppModalDialog::AcceptWindow() {
35 views::DialogClientView* client_view =
36 dialog_->window()->GetClientView()->AsDialogClientView();
37 client_view->AcceptWindow();
38 }
39
40 void AppModalDialog::CancelWindow() {
41 views::DialogClientView* client_view =
42 dialog_->window()->GetClientView()->AsDialogClientView();
43 client_view->CancelWindow();
44 }
OLDNEW
« 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