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 "content/browser/tab_contents/tab_contents_view.h" | 5 #include "content/browser/tab_contents/tab_contents_view.h" |
6 | 6 |
7 #include "content/browser/renderer_host/render_process_host.h" | 7 #include "content/browser/renderer_host/render_process_host.h" |
8 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
9 #include "content/browser/renderer_host/render_view_host_delegate.h" | 9 #include "content/browser/renderer_host/render_view_host_delegate.h" |
10 #include "content/browser/renderer_host/render_widget_host.h" | 10 #include "content/browser/renderer_host/render_widget_host.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Default implementation does nothing. Platforms may override. | 30 // Default implementation does nothing. Platforms may override. |
31 } | 31 } |
32 | 32 |
33 void TabContentsView::CreateNewWindow( | 33 void TabContentsView::CreateNewWindow( |
34 int route_id, | 34 int route_id, |
35 const ViewHostMsg_CreateWindow_Params& params) { | 35 const ViewHostMsg_CreateWindow_Params& params) { |
36 TabContents* new_contents = delegate_view_helper_.CreateNewWindow( | 36 TabContents* new_contents = delegate_view_helper_.CreateNewWindow( |
37 route_id, | 37 route_id, |
38 tab_contents_->profile(), | 38 tab_contents_->profile(), |
39 tab_contents_->GetSiteInstance(), | 39 tab_contents_->GetSiteInstance(), |
40 tab_contents_->GetWebUITypeForCurrentState(), | 40 WebUIFactory::GetWebUIType(tab_contents_->profile(), |
| 41 tab_contents_->GetURL()), |
41 tab_contents_, | 42 tab_contents_, |
42 params.window_container_type, | 43 params.window_container_type, |
43 params.frame_name); | 44 params.frame_name); |
44 | 45 |
45 if (new_contents) { | 46 if (new_contents) { |
46 NotificationService::current()->Notify( | 47 NotificationService::current()->Notify( |
47 NotificationType::CREATING_NEW_WINDOW, | 48 NotificationType::CREATING_NEW_WINDOW, |
48 Source<TabContents>(tab_contents_), | 49 Source<TabContents>(tab_contents_), |
49 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); | 50 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); |
50 | 51 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 160 } |
160 | 161 |
161 void TabContentsView::ShowCreatedFullscreenWidgetInternal( | 162 void TabContentsView::ShowCreatedFullscreenWidgetInternal( |
162 RenderWidgetHostView* widget_host_view) { | 163 RenderWidgetHostView* widget_host_view) { |
163 if (tab_contents_->delegate()) | 164 if (tab_contents_->delegate()) |
164 tab_contents_->delegate()->RenderWidgetShowing(); | 165 tab_contents_->delegate()->RenderWidgetShowing(); |
165 | 166 |
166 widget_host_view->InitAsFullscreen(); | 167 widget_host_view->InitAsFullscreen(); |
167 widget_host_view->GetRenderWidgetHost()->Init(); | 168 widget_host_view->GetRenderWidgetHost()->Init(); |
168 } | 169 } |
OLD | NEW |