| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_helper.h" | 5 #include "content/browser/tab_contents/tab_contents_view_helper.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/render_view_host_impl.h" | 7 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 8 #include "content/browser/tab_contents/tab_contents.h" | 8 #include "content/browser/tab_contents/tab_contents.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/port/browser/render_widget_host_view_port.h" | 10 #include "content/port/browser/render_widget_host_view_port.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/browser/notification_source.h" | 12 #include "content/public/browser/notification_source.h" |
| 13 #include "content/public/browser/notification_types.h" | 13 #include "content/public/browser/notification_types.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/browser/web_contents_delegate.h" | 15 #include "content/public/browser/web_contents_delegate.h" |
| 16 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
| 17 | 17 |
| 18 using content::RenderViewHostImpl; |
| 19 using content::RenderWidgetHost; |
| 20 using content::RenderWidgetHostImpl; |
| 18 using content::RenderWidgetHostView; | 21 using content::RenderWidgetHostView; |
| 19 using content::RenderWidgetHostViewPort; | 22 using content::RenderWidgetHostViewPort; |
| 20 using content::WebContents; | 23 using content::WebContents; |
| 21 | 24 |
| 22 TabContentsViewHelper::TabContentsViewHelper() { | 25 TabContentsViewHelper::TabContentsViewHelper() { |
| 23 registrar_.Add(this, | 26 registrar_.Add(this, |
| 24 content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 27 content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 25 content::NotificationService::AllBrowserContextsAndSources()); | 28 content::NotificationService::AllBrowserContextsAndSources()); |
| 26 } | 29 } |
| 27 | 30 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); | 176 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); |
| 174 if (is_fullscreen) { | 177 if (is_fullscreen) { |
| 175 widget_host_view->InitAsFullscreen(web_contents->GetRenderWidgetHostView()); | 178 widget_host_view->InitAsFullscreen(web_contents->GetRenderWidgetHostView()); |
| 176 } else { | 179 } else { |
| 177 widget_host_view->InitAsPopup(web_contents->GetRenderWidgetHostView(), | 180 widget_host_view->InitAsPopup(web_contents->GetRenderWidgetHostView(), |
| 178 initial_pos); | 181 initial_pos); |
| 179 } | 182 } |
| 180 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost())->Init(); | 183 RenderWidgetHostImpl::From(widget_host_view->GetRenderWidgetHost())->Init(); |
| 181 return widget_host_view; | 184 return widget_host_view; |
| 182 } | 185 } |
| OLD | NEW |