OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/js_modal_dialog_views.h" | 5 #include "chrome/browser/ui/views/js_modal_dialog_views.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" | 8 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |
9 #include "chrome/browser/ui/views/window.h" | 9 #include "chrome/browser/ui/views/window.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void JSModalDialogViews::ShowAppModalDialog() { | 47 void JSModalDialogViews::ShowAppModalDialog() { |
48 window()->Show(); | 48 window()->Show(); |
49 } | 49 } |
50 | 50 |
51 void JSModalDialogViews::ActivateAppModalDialog() { | 51 void JSModalDialogViews::ActivateAppModalDialog() { |
52 window()->Show(); | 52 window()->Show(); |
53 window()->Activate(); | 53 window()->Activate(); |
54 } | 54 } |
55 | 55 |
56 void JSModalDialogViews::CloseAppModalDialog() { | 56 void JSModalDialogViews::CloseAppModalDialog() { |
57 window()->CloseWindow(); | 57 window()->Close(); |
58 } | 58 } |
59 | 59 |
60 void JSModalDialogViews::AcceptAppModalDialog() { | 60 void JSModalDialogViews::AcceptAppModalDialog() { |
61 GetDialogClientView()->AcceptWindow(); | 61 GetDialogClientView()->AcceptWindow(); |
62 } | 62 } |
63 | 63 |
64 void JSModalDialogViews::CancelAppModalDialog() { | 64 void JSModalDialogViews::CancelAppModalDialog() { |
65 GetDialogClientView()->CancelWindow(); | 65 GetDialogClientView()->CancelWindow(); |
66 } | 66 } |
67 | 67 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // static | 154 // static |
155 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( | 155 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( |
156 JavaScriptAppModalDialog* dialog, | 156 JavaScriptAppModalDialog* dialog, |
157 gfx::NativeWindow parent_window) { | 157 gfx::NativeWindow parent_window) { |
158 JSModalDialogViews* d = new JSModalDialogViews(dialog); | 158 JSModalDialogViews* d = new JSModalDialogViews(dialog); |
159 | 159 |
160 browser::CreateViewsWindow(parent_window, gfx::Rect(), d); | 160 browser::CreateViewsWindow(parent_window, gfx::Rect(), d); |
161 return d; | 161 return d; |
162 } | 162 } |
OLD | NEW |