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/gtk/gtk_util.h" | 9 #include "chrome/browser/ui/gtk/gtk_util.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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 virtual GtkWidget* GetWidgetRoot() { | 37 virtual GtkWidget* GetWidgetRoot() { |
38 return GetNativeView(); | 38 return GetNativeView(); |
39 } | 39 } |
40 virtual GtkWidget* GetFocusWidget() { | 40 virtual GtkWidget* GetFocusWidget() { |
41 return html_tab_contents_.GetContentNativeView(); | 41 return html_tab_contents_.GetContentNativeView(); |
42 } | 42 } |
43 virtual void DeleteDelegate() { | 43 virtual void DeleteDelegate() { |
44 html_delegate_->OnDialogClosed(""); | 44 html_delegate_->OnDialogClosed(""); |
45 tab_container_->ChangeTabContents(NULL); | 45 tab_container_->ChangeTabContents(NULL); |
46 } | 46 } |
| 47 virtual gfx::Insets GetInsets() const { |
| 48 return gfx::Insets(); |
| 49 } |
47 | 50 |
48 // HtmlDialogTabContentsDelegate interface. | 51 // HtmlDialogTabContentsDelegate interface. |
49 void MoveContents(TabContents* source, const gfx::Rect& pos) {} | 52 void MoveContents(TabContents* source, const gfx::Rect& pos) {} |
50 void ToolbarSizeChanged(TabContents* source, bool is_animating) {} | 53 void ToolbarSizeChanged(TabContents* source, bool is_animating) {} |
51 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 54 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
52 | 55 |
53 void set_window(ConstrainedWindow* window) { | 56 void set_window(ConstrainedWindow* window) { |
54 window_ = window; | 57 window_ = window; |
55 } | 58 } |
56 | 59 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void ConstrainedHtmlUI::CreateConstrainedHtmlDialog( | 114 void ConstrainedHtmlUI::CreateConstrainedHtmlDialog( |
112 Profile* profile, | 115 Profile* profile, |
113 HtmlDialogUIDelegate* delegate, | 116 HtmlDialogUIDelegate* delegate, |
114 TabContents* container) { | 117 TabContents* container) { |
115 ConstrainedHtmlDelegateGtk* constrained_delegate = | 118 ConstrainedHtmlDelegateGtk* constrained_delegate = |
116 new ConstrainedHtmlDelegateGtk(profile, delegate); | 119 new ConstrainedHtmlDelegateGtk(profile, delegate); |
117 ConstrainedWindow* constrained_window = | 120 ConstrainedWindow* constrained_window = |
118 container->CreateConstrainedDialog(constrained_delegate); | 121 container->CreateConstrainedDialog(constrained_delegate); |
119 constrained_delegate->set_window(constrained_window); | 122 constrained_delegate->set_window(constrained_window); |
120 } | 123 } |
OLD | NEW |