Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index f7800471676aed5725cecfc16f4d9acf23717aa0..3f99dbc887cfeb775fd5b0df452fda3405ed7c88 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1706,6 +1706,9 @@ void WebContentsImpl::ShowCreatedWindow(int route_id, |
WebContentsImpl* contents = GetCreatedWindow(route_id); |
if (contents) { |
WebContentsDelegate* delegate = GetDelegate(); |
+ if (!delegate || delegate->ShouldResumeRequestsForCreatedWindow()) |
+ contents->ResumeLoadingCreatedWebContents(); |
+ |
if (delegate) { |
delegate->AddNewContents( |
this, contents, disposition, initial_rect, user_gesture, NULL); |
@@ -1793,11 +1796,6 @@ WebContentsImpl* WebContentsImpl::GetCreatedWindow(int route_id) { |
!new_contents->GetRenderViewHost()->GetView()) |
return NULL; |
- // Resume blocked requests for both the RenderViewHost and RenderFrameHost. |
- // TODO(brettw): It seems bogus to reach into here and initialize the host. |
- static_cast<RenderViewHostImpl*>(new_contents->GetRenderViewHost())->Init(); |
- static_cast<RenderFrameHostImpl*>(new_contents->GetMainFrame())->Init(); |
- |
return new_contents; |
} |
@@ -4263,6 +4261,12 @@ bool WebContentsImpl::GetAllowOtherViews() { |
#endif |
+void WebContentsImpl::ResumeLoadingCreatedWebContents() { |
+ // TODO(brettw): It seems bogus to reach into here and initialize the host. |
+ static_cast<RenderViewHostImpl*>(this->GetRenderViewHost())->Init(); |
+ static_cast<RenderFrameHostImpl*>(this->GetMainFrame())->Init(); |
+} |
+ |
void WebContentsImpl::OnDialogClosed(int render_process_id, |
int render_frame_id, |
IPC::Message* reply_msg, |