| 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/utf_string_conversions.h" | 7 #include "base/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 "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 //////////////////////////////////////////////////////////////////////////////// | 157 //////////////////////////////////////////////////////////////////////////////// |
| 158 // NativeAppModalDialog, public: | 158 // NativeAppModalDialog, public: |
| 159 | 159 |
| 160 // static | 160 // static |
| 161 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( | 161 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( |
| 162 JavaScriptAppModalDialog* dialog, | 162 JavaScriptAppModalDialog* dialog, |
| 163 gfx::NativeWindow parent_window) { | 163 gfx::NativeWindow parent_window) { |
| 164 JavaScriptAppModalDialogViews* d = new JavaScriptAppModalDialogViews(dialog); | 164 JavaScriptAppModalDialogViews* d = new JavaScriptAppModalDialogViews(dialog); |
| 165 if (parent_window) | 165 views::Widget::CreateWindowWithParent(d, parent_window); |
| 166 views::Widget::CreateWindowWithParent(d, parent_window); | |
| 167 else | |
| 168 views::Widget::CreateWindow(d); | |
| 169 return d; | 166 return d; |
| 170 } | 167 } |
| OLD | NEW |