OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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/js_modal_dialog.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "chrome/browser/views/jsmessage_box_dialog.h" |
| 9 #include "chrome/browser/tab_contents/tab_contents.h" |
| 10 #include "views/window/window.h" |
| 11 |
| 12 int JavaScriptAppModalDialog::GetDialogButtons() { |
| 13 return dialog_->GetDialogButtons(); |
| 14 } |
| 15 |
| 16 void JavaScriptAppModalDialog::AcceptWindow() { |
| 17 views::DialogClientView* client_view = |
| 18 dialog_->window()->GetClientView()->AsDialogClientView(); |
| 19 client_view->AcceptWindow(); |
| 20 } |
| 21 |
| 22 void JavaScriptAppModalDialog::CancelWindow() { |
| 23 views::DialogClientView* client_view = |
| 24 dialog_->window()->GetClientView()->AsDialogClientView(); |
| 25 client_view->CancelWindow(); |
| 26 } |
| 27 |
| 28 NativeDialog JavaScriptAppModalDialog::CreateNativeDialog() { |
| 29 return new JavaScriptMessageBoxDialog(this, message_text_, |
| 30 default_prompt_text_, display_suppress_checkbox_); |
| 31 } |
| 32 |
OLD | NEW |