| 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 05f980664b463b1a958203d03c01e31495ab56ac..ae844eb67d5c559cf084ad987c15f3d5bf1638f3 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -1707,6 +1707,9 @@ void WebContentsImpl::ShowCreatedWindow(int route_id,
|
| WebContentsImpl* contents = GetCreatedWindow(route_id);
|
| if (contents) {
|
| WebContentsDelegate* delegate = GetDelegate();
|
| + if (!delegate || delegate->ShouldResumeRequestsForCreatedWindow())
|
| + ResumeRequestsForCreatedWindow(*contents);
|
| +
|
| if (delegate) {
|
| delegate->AddNewContents(
|
| this, contents, disposition, initial_rect, user_gesture, NULL);
|
| @@ -1794,14 +1797,16 @@ 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;
|
| }
|
|
|
| +void WebContentsImpl::ResumeRequestsForCreatedWindow(
|
| + WebContentsImpl& new_contents) {
|
| + // 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();
|
| +}
|
| +
|
| RenderWidgetHostView* WebContentsImpl::GetCreatedWidget(int route_id) {
|
| PendingWidgetViews::iterator iter = pending_widget_views_.find(route_id);
|
| if (iter == pending_widget_views_.end()) {
|
| @@ -4254,6 +4259,10 @@ bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
|
| true);
|
| }
|
|
|
| +void WebContentsImpl::ResumeLoadingCreatedWebContents() {
|
| + ResumeRequestsForCreatedWindow(*this);
|
| +}
|
| +
|
| #elif defined(OS_MACOSX)
|
|
|
| void WebContentsImpl::SetAllowOtherViews(bool allow) {
|
|
|