| 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/webui/constrained_web_dialog_delegate_base.h" | 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 10 #include "chrome/browser/ui/views/constrained_window_views.h" | 10 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
| 12 #include "content/public/browser/native_web_keyboard_event.h" | 12 #include "content/public/browser/native_web_keyboard_event.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 #include "ui/views/controls/webview/webview.h" | 15 #include "ui/views/controls/webview/webview.h" |
| 16 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
| 17 #include "ui/views/widget/widget_delegate.h" | 17 #include "ui/views/widget/widget_delegate.h" |
| 18 #include "ui/web_dialogs/web_dialog_delegate.h" | 18 #include "ui/web_dialogs/web_dialog_delegate.h" |
| 19 #include "ui/web_dialogs/web_dialog_ui.h" | 19 #include "ui/web_dialogs/web_dialog_ui.h" |
| 20 | 20 |
| 21 using content::WebContents; | 21 using content::WebContents; |
| 22 using ui::ConstrainedWebDialogDelegate; | 22 using ui::ConstrainedWebDialogDelegate; |
| 23 using ui::ConstrainedWebDialogUI; | 23 using ui::ConstrainedWebDialogUI; |
| 24 using ui::WebDialogDelegate; | 24 using ui::WebDialogDelegate; |
| 25 using ui::WebDialogWebContentsDelegate; |
| 25 | 26 |
| 26 namespace { | 27 namespace { |
| 27 | 28 |
| 28 class ConstrainedWebDialogDelegateViews | 29 class ConstrainedWebDialogDelegateViews |
| 29 : public ConstrainedWebDialogDelegateBase { | 30 : public ConstrainedWebDialogDelegateBase { |
| 30 public: | 31 public: |
| 31 ConstrainedWebDialogDelegateViews( | 32 ConstrainedWebDialogDelegateViews( |
| 32 Profile* profile, | 33 Profile* profile, |
| 33 WebDialogDelegate* delegate, | 34 WebDialogDelegate* delegate, |
| 34 WebDialogWebContentsDelegate* tab_delegate, | 35 WebDialogWebContentsDelegate* tab_delegate, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 WebDialogDelegate* delegate, | 174 WebDialogDelegate* delegate, |
| 174 WebDialogWebContentsDelegate* tab_delegate, | 175 WebDialogWebContentsDelegate* tab_delegate, |
| 175 TabContents* container) { | 176 TabContents* container) { |
| 176 ConstrainedWebDialogDelegateViewViews* constrained_delegate = | 177 ConstrainedWebDialogDelegateViewViews* constrained_delegate = |
| 177 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate)
; | 178 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate)
; |
| 178 ConstrainedWindow* constrained_window = | 179 ConstrainedWindow* constrained_window = |
| 179 new ConstrainedWindowViews(container, constrained_delegate); | 180 new ConstrainedWindowViews(container, constrained_delegate); |
| 180 constrained_delegate->set_window(constrained_window); | 181 constrained_delegate->set_window(constrained_window); |
| 181 return constrained_delegate; | 182 return constrained_delegate; |
| 182 } | 183 } |
| OLD | NEW |