Index: content/browser/tab_contents/tab_contents_view_helper.cc |
diff --git a/content/browser/tab_contents/tab_contents_view_helper.cc b/content/browser/tab_contents/tab_contents_view_helper.cc |
index 75896d3c6bc623159543b40ef119f022b8c9f000..fceb1c823d94812d5c3ef25ab589b33fc60e4ab3 100644 |
--- a/content/browser/tab_contents/tab_contents_view_helper.cc |
+++ b/content/browser/tab_contents/tab_contents_view_helper.cc |
@@ -82,6 +82,8 @@ TabContents* TabContentsViewHelper::CreateNewWindow( |
params.target_url, |
new_contents); |
+ // TODO(brettw): It seems bogus to reach into here and initialize the host. |
+ new_contents->GetRenderViewHost()->Init(); |
return new_contents; |
} |
@@ -100,6 +102,10 @@ RenderWidgetHostView* TabContentsViewHelper::CreateNewWidget( |
} |
// Save the created widget associated with the route so we can show it later. |
pending_widget_views_[route_id] = widget_view; |
+ |
+ // TODO(jamesr): Check if this is bogus. If it's not, remove the |
+ // pending_contents_ stuff. |
+ widget_host->Init(); |
return widget_view; |
} |
@@ -119,8 +125,6 @@ TabContents* TabContentsViewHelper::GetCreatedWindow(int route_id) { |
!new_contents->GetRenderViewHost()->view()) |
return NULL; |
- // TODO(brettw): It seems bogus to reach into here and initialize the host. |
- new_contents->GetRenderViewHost()->Init(); |
return new_contents; |
} |