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 26 matching lines...) Expand all Loading... |
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 tab_contents_->GetWebUITypeForCurrentState(), |
41 tab_contents_, | 41 tab_contents_, |
42 params.window_container_type, | 42 params.window_container_type, |
43 params.frame_name); | 43 params.frame_name); |
44 | 44 |
45 if (new_contents) { | 45 if (new_contents) { |
46 NotificationService::current()->Notify( | 46 NotificationService::current()->Notify( |
47 NotificationType::CREATING_NEW_WINDOW, | 47 content::NOTIFICATION_CREATING_NEW_WINDOW, |
48 Source<TabContents>(tab_contents_), | 48 Source<TabContents>(tab_contents_), |
49 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); | 49 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); |
50 | 50 |
51 if (tab_contents_->delegate()) | 51 if (tab_contents_->delegate()) |
52 tab_contents_->delegate()->TabContentsCreated(new_contents); | 52 tab_contents_->delegate()->TabContentsCreated(new_contents); |
53 } else { | 53 } else { |
54 NotificationService::current()->Notify( | 54 NotificationService::current()->Notify( |
55 NotificationType::CREATING_NEW_WINDOW_CANCELLED, | 55 content::NOTIFICATION_CREATING_NEW_WINDOW_CANCELLED, |
56 Source<TabContents>(tab_contents_), | 56 Source<TabContents>(tab_contents_), |
57 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); | 57 Details<const ViewHostMsg_CreateWindow_Params>(¶ms)); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 void TabContentsView::CreateNewWidget(int route_id, | 61 void TabContentsView::CreateNewWidget(int route_id, |
62 WebKit::WebPopupType popup_type) { | 62 WebKit::WebPopupType popup_type) { |
63 CreateNewWidgetInternal(route_id, popup_type); | 63 CreateNewWidgetInternal(route_id, popup_type); |
64 } | 64 } |
65 | 65 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 void TabContentsView::ShowCreatedFullscreenWidgetInternal( | 166 void TabContentsView::ShowCreatedFullscreenWidgetInternal( |
167 RenderWidgetHostView* widget_host_view) { | 167 RenderWidgetHostView* widget_host_view) { |
168 if (tab_contents_->delegate()) | 168 if (tab_contents_->delegate()) |
169 tab_contents_->delegate()->RenderWidgetShowing(); | 169 tab_contents_->delegate()->RenderWidgetShowing(); |
170 | 170 |
171 widget_host_view->InitAsFullscreen(); | 171 widget_host_view->InitAsFullscreen(); |
172 widget_host_view->GetRenderWidgetHost()->Init(); | 172 widget_host_view->GetRenderWidgetHost()->Init(); |
173 } | 173 } |
OLD | NEW |