| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tab_contents/tab_contents_view.h" | 5 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/render_process_host.h" | 7 #include "chrome/browser/renderer_host/render_process_host.h" |
| 8 #include "chrome/browser/renderer_host/render_widget_host.h" | 8 #include "chrome/browser/renderer_host/render_widget_host.h" |
| 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void TabContentsView::RenderViewCreated(RenderViewHost* host) { | 25 void TabContentsView::RenderViewCreated(RenderViewHost* host) { |
| 26 // Default implementation does nothing. Platforms may override. | 26 // Default implementation does nothing. Platforms may override. |
| 27 } | 27 } |
| 28 | 28 |
| 29 void TabContentsView::UpdatePreferredWidth(int pref_width) { | 29 void TabContentsView::UpdatePreferredWidth(int pref_width) { |
| 30 preferred_width_ = pref_width; | 30 preferred_width_ = pref_width; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void TabContentsView::CreateNewWindow(int route_id, | 33 void TabContentsView::CreateNewWindow(int route_id, |
| 34 base::WaitableEvent* modal_dialog_event) { | 34 base::WaitableEvent* modal_dialog_event) { |
| 35 delegate_view_helper_.CreateNewWindow(route_id, modal_dialog_event, | 35 delegate_view_helper_.CreateNewWindow( |
| 36 tab_contents_->profile(), | 36 route_id, modal_dialog_event, |
| 37 tab_contents_->GetSiteInstance()); | 37 tab_contents_->profile(), tab_contents_->GetSiteInstance(), |
| 38 DOMUIFactory::GetDOMUIType(tab_contents_->GetURL())); |
| 38 } | 39 } |
| 39 | 40 |
| 40 void TabContentsView::CreateNewWidget(int route_id, bool activatable) { | 41 void TabContentsView::CreateNewWidget(int route_id, bool activatable) { |
| 41 CreateNewWidgetInternal(route_id, activatable); | 42 CreateNewWidgetInternal(route_id, activatable); |
| 42 } | 43 } |
| 43 | 44 |
| 44 void TabContentsView::ShowCreatedWindow(int route_id, | 45 void TabContentsView::ShowCreatedWindow(int route_id, |
| 45 WindowOpenDisposition disposition, | 46 WindowOpenDisposition disposition, |
| 46 const gfx::Rect& initial_pos, | 47 const gfx::Rect& initial_pos, |
| 47 bool user_gesture, | 48 bool user_gesture, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 68 | 69 |
| 69 void TabContentsView::ShowCreatedWidgetInternal( | 70 void TabContentsView::ShowCreatedWidgetInternal( |
| 70 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { | 71 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { |
| 71 if (tab_contents_->delegate()) | 72 if (tab_contents_->delegate()) |
| 72 tab_contents_->delegate()->RenderWidgetShowing(); | 73 tab_contents_->delegate()->RenderWidgetShowing(); |
| 73 | 74 |
| 74 widget_host_view->InitAsPopup(tab_contents_->render_widget_host_view(), | 75 widget_host_view->InitAsPopup(tab_contents_->render_widget_host_view(), |
| 75 initial_pos); | 76 initial_pos); |
| 76 widget_host_view->GetRenderWidgetHost()->Init(); | 77 widget_host_view->GetRenderWidgetHost()->Init(); |
| 77 } | 78 } |
| OLD | NEW |