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 cb891ec95c3cb8e8685faf0e5193d3ba5178e1f1..a1c3c53364c912c798931a00a6b34a7130cff366 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1756,7 +1756,15 @@ void WebContentsImpl::CreateNewWindow( |
ui::PAGE_TRANSITION_LINK, |
true /* is_renderer_initiated */); |
open_params.user_gesture = params.user_gesture; |
- new_contents->OpenURL(open_params); |
+ |
+ if (delegate_ && !is_guest && |
+ !delegate_->ShouldResumeRequestsForCreatedWindow()) { |
+ // We are in asynchronous add new contents path, delay opening url |
+ new_contents->delayed_open_url_params_.reset( |
+ new OpenURLParams(open_params)); |
+ } else { |
+ new_contents->OpenURL(open_params); |
+ } |
} |
} |
} |
@@ -2669,6 +2677,12 @@ void WebContentsImpl::ExitFullscreen() { |
} |
void WebContentsImpl::ResumeLoadingCreatedWebContents() { |
+ if (delayed_open_url_params_.get()) { |
+ OpenURL(*delayed_open_url_params_.get()); |
+ delayed_open_url_params_.reset(nullptr); |
+ return; |
nasko
2015/07/10 07:42:20
Why is there a return here? Skipping the initializ
Maria
2015/07/10 16:26:25
This function is not called in the initialization
|
+ } |
+ |
// Resume blocked requests for both the RenderViewHost and RenderFrameHost. |
// TODO(brettw): It seems bogus to reach into here and initialize the host. |
GetRenderViewHost()->Init(); |