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/web_dialog_view.h" | 5 #include "chrome/browser/ui/views/web_dialog_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/property_bag.h" | 9 #include "base/property_bag.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "ui/views/events/event.h" | 21 #include "ui/views/events/event.h" |
22 #include "ui/views/layout/fill_layout.h" | 22 #include "ui/views/layout/fill_layout.h" |
23 #include "ui/views/widget/root_view.h" | 23 #include "ui/views/widget/root_view.h" |
24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
25 | 25 |
26 #if defined(USE_AURA) | 26 #if defined(USE_AURA) |
27 #include "ui/aura/event.h" | 27 #include "ui/aura/event.h" |
28 #include "ui/views/widget/native_widget_aura.h" | 28 #include "ui/views/widget/native_widget_aura.h" |
29 #endif | 29 #endif |
30 | 30 |
| 31 using content::NativeWebKeyboardEvent; |
31 using content::WebContents; | 32 using content::WebContents; |
32 using content::WebUIMessageHandler; | 33 using content::WebUIMessageHandler; |
33 | 34 |
34 namespace browser { | 35 namespace browser { |
35 | 36 |
36 // Declared in browser_dialogs.h so that others don't need to depend on our .h. | 37 // Declared in browser_dialogs.h so that others don't need to depend on our .h. |
37 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, | 38 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, |
38 Profile* profile, | 39 Profile* profile, |
39 Browser* browser, | 40 Browser* browser, |
40 WebDialogDelegate* delegate) { | 41 WebDialogDelegate* delegate) { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 316 |
316 if (delegate_) { | 317 if (delegate_) { |
317 gfx::Size out; | 318 gfx::Size out; |
318 delegate_->GetDialogSize(&out); | 319 delegate_->GetDialogSize(&out); |
319 if (!out.IsEmpty() && GetWidget()) | 320 if (!out.IsEmpty() && GetWidget()) |
320 GetWidget()->CenterWindow(out); | 321 GetWidget()->CenterWindow(out); |
321 } | 322 } |
322 | 323 |
323 web_view_->LoadInitialURL(GetDialogContentURL()); | 324 web_view_->LoadInitialURL(GetDialogContentURL()); |
324 } | 325 } |
OLD | NEW |