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 "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_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
10 #include "chrome/browser/ui/views/constrained_window_views.h" | 10 #include "chrome/browser/ui/views/constrained_window_views.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 gfx::Size size; | 69 gfx::Size size; |
70 html_delegate_->GetDialogSize(&size); | 70 html_delegate_->GetDialogSize(&size); |
71 return size; | 71 return size; |
72 } | 72 } |
73 | 73 |
74 virtual void ViewHierarchyChanged(bool is_add, | 74 virtual void ViewHierarchyChanged(bool is_add, |
75 views::View* parent, | 75 views::View* parent, |
76 views::View* child) OVERRIDE { | 76 views::View* child) OVERRIDE { |
77 TabContentsContainer::ViewHierarchyChanged(is_add, parent, child); | 77 TabContentsContainer::ViewHierarchyChanged(is_add, parent, child); |
78 if (is_add && child == this) { | 78 if (is_add && child == this) { |
79 ChangeTabContents(html_tab_contents_->tab_contents()); | 79 ChangeWebContents(html_tab_contents_->tab_contents()); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 void set_window(ConstrainedWindow* window) { | 83 void set_window(ConstrainedWindow* window) { |
84 window_ = window; | 84 window_ = window; |
85 } | 85 } |
86 | 86 |
87 private: | 87 private: |
88 scoped_ptr<TabContentsWrapper> html_tab_contents_; | 88 scoped_ptr<TabContentsWrapper> html_tab_contents_; |
89 | 89 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 Profile* profile, | 146 Profile* profile, |
147 HtmlDialogUIDelegate* delegate, | 147 HtmlDialogUIDelegate* delegate, |
148 TabContentsWrapper* container) { | 148 TabContentsWrapper* container) { |
149 ConstrainedHtmlDelegateViews* constrained_delegate = | 149 ConstrainedHtmlDelegateViews* constrained_delegate = |
150 new ConstrainedHtmlDelegateViews(profile, delegate); | 150 new ConstrainedHtmlDelegateViews(profile, delegate); |
151 ConstrainedWindow* constrained_window = | 151 ConstrainedWindow* constrained_window = |
152 new ConstrainedWindowViews(container, constrained_delegate); | 152 new ConstrainedWindowViews(container, constrained_delegate); |
153 constrained_delegate->set_window(constrained_window); | 153 constrained_delegate->set_window(constrained_window); |
154 return constrained_delegate; | 154 return constrained_delegate; |
155 } | 155 } |
OLD | NEW |