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

Side by Side Diff: chrome/browser/app_modal_dialog_win.cc

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/app_modal_dialog_mac.mm ('k') | chrome/browser/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/app_modal_dialog.h" 5 #include "chrome/browser/app_modal_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/views/jsmessage_box_dialog.h" 8 #include "chrome/browser/views/jsmessage_box_dialog.h"
9 #include "views/window/dialog_delegate.h"
9 #include "views/window/window.h" 10 #include "views/window/window.h"
10 11
11 AppModalDialog::~AppModalDialog() { 12 AppModalDialog::~AppModalDialog() {
12 } 13 }
13 14
14 void AppModalDialog::CreateAndShowDialog() { 15 void AppModalDialog::CreateAndShowDialog() {
15 dialog_ = new JavascriptMessageBoxDialog(this, message_text_, 16 dialog_ = CreateNativeDialog();
16 default_prompt_text_, display_suppress_checkbox_);
17 DCHECK(dialog_->IsModal()); 17 DCHECK(dialog_->IsModal());
18 dialog_->ShowModalDialog(); 18 dialog_->ShowModalDialog();
19 } 19 }
20 20
21 void AppModalDialog::ActivateModalDialog() { 21 void AppModalDialog::ActivateModalDialog() {
22 dialog_->ActivateModalDialog(); 22 dialog_->ActivateModalDialog();
23 } 23 }
24 24
25 void AppModalDialog::CloseModalDialog() { 25 void AppModalDialog::CloseModalDialog() {
26 dialog_->CloseModalDialog(); 26 dialog_->CloseModalDialog();
27 } 27 }
28
29 int AppModalDialog::GetDialogButtons() {
30 return dialog_->GetDialogButtons();
31 }
32
33 void AppModalDialog::AcceptWindow() {
34 views::DialogClientView* client_view =
35 dialog_->window()->GetClientView()->AsDialogClientView();
36 client_view->AcceptWindow();
37 }
38
39 void AppModalDialog::CancelWindow() {
40 views::DialogClientView* client_view =
41 dialog_->window()->GetClientView()->AsDialogClientView();
42 client_view->CancelWindow();
43 }
OLDNEW
« no previous file with comments | « chrome/browser/app_modal_dialog_mac.mm ('k') | chrome/browser/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698