Chromium Code Reviews| 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 59791b51e94f69bfbe162b375242ea576cb65ebc..77d7c441cc8fd33da418ad9607367ae27658c44e 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1702,6 +1702,10 @@ void WebContentsImpl::ShowCreatedWindow(int route_id, |
| WebContentsImpl* contents = GetCreatedWindow(route_id); |
| if (contents) { |
| WebContentsDelegate* delegate = GetDelegate(); |
| + if (!BrowserPluginGuest::IsGuest(contents) && |
|
Maria
2015/04/25 01:40:28
This check should probably be within web contents
Fady Samuel
2015/04/28 19:50:23
Stick it in GuestViewBase::ShouldResumeRequestsFor
|
| + (!delegate || delegate->ShouldResumeRequestsForCreatedWindow())) |
| + contents->ResumeLoadingCreatedWebContents(); |
| + |
| if (delegate) { |
| delegate->AddNewContents( |
| this, contents, disposition, initial_rect, user_gesture, NULL); |
| @@ -1789,11 +1793,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. |
| - new_contents->GetRenderViewHost()->Init(); |
| - new_contents->GetMainFrame()->Init(); |
| - |
| return new_contents; |
| } |
| @@ -2540,6 +2539,13 @@ void WebContentsImpl::ExitFullscreen() { |
| ExitFullscreenMode(); |
| } |
| +void WebContentsImpl::ResumeLoadingCreatedWebContents() { |
| + // Resume blocked requests for both the RenderViewHost and RenderFrameHost. |
| + // TODO(brettw): It seems bogus to reach into here and initialize the host. |
| + GetRenderViewHost()->Init(); |
| + GetMainFrame()->Init(); |
| +} |
| + |
| bool WebContentsImpl::FocusLocationBarByDefault() { |
| NavigationEntry* entry = controller_.GetVisibleEntry(); |
| if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) |