Chromium Code Reviews| Index: content/browser/tab_contents/tab_contents_view_helper.cc |
| diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/content/browser/tab_contents/tab_contents_view_helper.cc |
| similarity index 86% |
| rename from chrome/browser/tab_contents/render_view_host_delegate_helper.cc |
| rename to content/browser/tab_contents/tab_contents_view_helper.cc |
| index 451e7b9c7563e33b40daded1c0b3ceb4b4f3fc99..d09f32598252e4ae229cc16667aec8bcb645003e 100644 |
| --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc |
| +++ b/content/browser/tab_contents/tab_contents_view_helper.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
| +#include "content/browser/tab_contents/tab_contents_view_helper.h" |
| #include "content/browser/renderer_host/render_view_host.h" |
| #include "content/browser/renderer_host/render_widget_host.h" |
| @@ -16,17 +16,15 @@ |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_delegate.h" |
| -using content::WebContents; |
| - |
| -RenderViewHostDelegateViewHelper::RenderViewHostDelegateViewHelper() { |
| +TabContentsViewHelper::TabContentsViewHelper() { |
| registrar_.Add(this, |
| content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| content::NotificationService::AllBrowserContextsAndSources()); |
| } |
| -RenderViewHostDelegateViewHelper::~RenderViewHostDelegateViewHelper() {} |
| +TabContentsViewHelper::~TabContentsViewHelper() {} |
| -void RenderViewHostDelegateViewHelper::Observe( |
| +void TabContentsViewHelper::Observe( |
| int type, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) { |
| @@ -41,8 +39,8 @@ void RenderViewHostDelegateViewHelper::Observe( |
| } |
| } |
| -TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow( |
| - WebContents* web_contents, |
| +TabContents* TabContentsViewHelper::CreateNewWindow( |
| + content::WebContents* web_contents, |
| int route_id, |
| const ViewHostMsg_CreateWindow_Params& params) { |
| bool should_create = true; |
| @@ -85,8 +83,8 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow( |
| return new_contents; |
| } |
| -RenderWidgetHostView* RenderViewHostDelegateViewHelper::CreateNewWidget( |
| - WebContents* web_contents, |
| +RenderWidgetHostView* TabContentsViewHelper::CreateNewWidget( |
| + content::WebContents* web_contents, |
|
jam
2012/01/11 03:27:42
nit: why add content::WebContents everywhere? all
Avi (use Gerrit)
2012/01/11 03:34:29
Um.. Why did this seem like a good idea? :\
|
| int route_id, |
| bool is_fullscreen, |
| WebKit::WebPopupType popup_type) { |
| @@ -103,7 +101,7 @@ RenderWidgetHostView* RenderViewHostDelegateViewHelper::CreateNewWidget( |
| return widget_view; |
| } |
| -TabContents* RenderViewHostDelegateViewHelper::GetCreatedWindow(int route_id) { |
| +TabContents* TabContentsViewHelper::GetCreatedWindow(int route_id) { |
| PendingContents::iterator iter = pending_contents_.find(route_id); |
| // Certain systems can block the creation of new windows. If we didn't succeed |
| @@ -124,8 +122,7 @@ TabContents* RenderViewHostDelegateViewHelper::GetCreatedWindow(int route_id) { |
| return new_contents; |
| } |
| -RenderWidgetHostView* RenderViewHostDelegateViewHelper::GetCreatedWidget( |
| - int route_id) { |
| +RenderWidgetHostView* TabContentsViewHelper::GetCreatedWidget(int route_id) { |
| PendingWidgetViews::iterator iter = pending_widget_views_.find(route_id); |
| if (iter == pending_widget_views_.end()) { |
| DCHECK(false); |
| @@ -144,8 +141,8 @@ RenderWidgetHostView* RenderViewHostDelegateViewHelper::GetCreatedWidget( |
| return widget_host_view; |
| } |
| -TabContents* RenderViewHostDelegateViewHelper::ShowCreatedWindow( |
| - WebContents* web_contents, |
| +TabContents* TabContentsViewHelper::ShowCreatedWindow( |
| + content::WebContents* web_contents, |
| int route_id, |
| WindowOpenDisposition disposition, |
| const gfx::Rect& initial_pos, |
| @@ -160,8 +157,8 @@ TabContents* RenderViewHostDelegateViewHelper::ShowCreatedWindow( |
| return contents; |
| } |
| -RenderWidgetHostView* RenderViewHostDelegateViewHelper::ShowCreatedWidget( |
| - WebContents* web_contents, |
| +RenderWidgetHostView* TabContentsViewHelper::ShowCreatedWidget( |
| + content::WebContents* web_contents, |
| int route_id, |
| bool is_fullscreen, |
| const gfx::Rect& initial_pos) { |