OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/javascript_app_modal_dialog_views.h" | 5 #include "chrome/browser/ui/views/javascript_app_modal_dialog_views.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" | 8 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" |
9 #include "chrome/browser/ui/views/constrained_window_views.h" | 9 #include "chrome/browser/ui/views/constrained_window_views.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 parent_->OnCancel(message_box_view_->IsCheckBoxSelected()); | 101 parent_->OnCancel(message_box_view_->IsCheckBoxSelected()); |
102 return true; | 102 return true; |
103 } | 103 } |
104 | 104 |
105 bool JavaScriptAppModalDialogViews::Accept() { | 105 bool JavaScriptAppModalDialogViews::Accept() { |
106 parent_->OnAccept(message_box_view_->GetInputText(), | 106 parent_->OnAccept(message_box_view_->GetInputText(), |
107 message_box_view_->IsCheckBoxSelected()); | 107 message_box_view_->IsCheckBoxSelected()); |
108 return true; | 108 return true; |
109 } | 109 } |
110 | 110 |
111 void JavaScriptAppModalDialogViews::OnClose() { | 111 void JavaScriptAppModalDialogViews::OnClosed() { |
112 parent_->OnClose(); | 112 parent_->OnClose(); |
113 } | 113 } |
114 | 114 |
115 views::Widget* JavaScriptAppModalDialogViews::GetWidget() { | 115 views::Widget* JavaScriptAppModalDialogViews::GetWidget() { |
116 return message_box_view_->GetWidget(); | 116 return message_box_view_->GetWidget(); |
117 } | 117 } |
118 | 118 |
119 const views::Widget* JavaScriptAppModalDialogViews::GetWidget() const { | 119 const views::Widget* JavaScriptAppModalDialogViews::GetWidget() const { |
120 return message_box_view_->GetWidget(); | 120 return message_box_view_->GetWidget(); |
121 } | 121 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // NativeAppModalDialog, public: | 159 // NativeAppModalDialog, public: |
160 | 160 |
161 // static | 161 // static |
162 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( | 162 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( |
163 JavaScriptAppModalDialog* dialog, | 163 JavaScriptAppModalDialog* dialog, |
164 gfx::NativeWindow parent_window) { | 164 gfx::NativeWindow parent_window) { |
165 JavaScriptAppModalDialogViews* d = new JavaScriptAppModalDialogViews(dialog); | 165 JavaScriptAppModalDialogViews* d = new JavaScriptAppModalDialogViews(dialog); |
166 CreateBrowserModalDialogViews(d, parent_window); | 166 CreateBrowserModalDialogViews(d, parent_window); |
167 return d; | 167 return d; |
168 } | 168 } |
OLD | NEW |