| 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/webui/constrained_html_ui.h" | 5 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" | 8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" | 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" |
| 11 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" | 11 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" |
| 12 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 12 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 13 #include "content/browser/tab_contents/tab_contents.h" | 13 #include "content/browser/tab_contents/tab_contents.h" |
| 14 #include "ui/base/gtk/gtk_hig_constants.h" | 14 #include "ui/base/gtk/gtk_hig_constants.h" |
| 15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
| 16 #include "ui/views/widget/native_widget_gtk.h" | 16 #include "views/widget/native_widget_gtk.h" |
| 17 | 17 |
| 18 // ConstrainedHtmlDelegateGtk works with ConstrainedWindowGtk to present | 18 // ConstrainedHtmlDelegateGtk works with ConstrainedWindowGtk to present |
| 19 // a TabContents in a ContraintedHtmlUI. | 19 // a TabContents in a ContraintedHtmlUI. |
| 20 class ConstrainedHtmlDelegateGtk : public views::NativeWidgetGtk, | 20 class ConstrainedHtmlDelegateGtk : public views::NativeWidgetGtk, |
| 21 public ConstrainedHtmlUIDelegate, | 21 public ConstrainedHtmlUIDelegate, |
| 22 public ConstrainedWindowGtkDelegate, | 22 public ConstrainedWindowGtkDelegate, |
| 23 public HtmlDialogTabContentsDelegate { | 23 public HtmlDialogTabContentsDelegate { |
| 24 public: | 24 public: |
| 25 ConstrainedHtmlDelegateGtk(Profile* profile, | 25 ConstrainedHtmlDelegateGtk(Profile* profile, |
| 26 HtmlDialogUIDelegate* delegate); | 26 HtmlDialogUIDelegate* delegate); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 Profile* profile, | 141 Profile* profile, |
| 142 HtmlDialogUIDelegate* delegate, | 142 HtmlDialogUIDelegate* delegate, |
| 143 TabContentsWrapper* wrapper) { | 143 TabContentsWrapper* wrapper) { |
| 144 ConstrainedHtmlDelegateGtk* constrained_delegate = | 144 ConstrainedHtmlDelegateGtk* constrained_delegate = |
| 145 new ConstrainedHtmlDelegateGtk(profile, delegate); | 145 new ConstrainedHtmlDelegateGtk(profile, delegate); |
| 146 ConstrainedWindow* constrained_window = | 146 ConstrainedWindow* constrained_window = |
| 147 new ConstrainedWindowGtk(wrapper, constrained_delegate); | 147 new ConstrainedWindowGtk(wrapper, constrained_delegate); |
| 148 constrained_delegate->set_window(constrained_window); | 148 constrained_delegate->set_window(constrained_window); |
| 149 return constrained_delegate; | 149 return constrained_delegate; |
| 150 } | 150 } |
| OLD | NEW |