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 57bf80bd366110b2f50b79103ba8fe03775e1ae0..92593b26855b5ef10b71c000164767571f144b36 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -360,6 +360,7 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context) |
load_state_(net::LOAD_STATE_IDLE, base::string16()), |
upload_size_(0), |
upload_position_(0), |
+ is_resume_pending_(false), |
displayed_insecure_content_(false), |
has_accessed_initial_document_(false), |
theme_color_(SK_ColorTRANSPARENT), |
@@ -1817,6 +1818,7 @@ void WebContentsImpl::ShowCreatedWindow(int route_id, |
WebContentsImpl* contents = GetCreatedWindow(route_id); |
if (contents) { |
WebContentsDelegate* delegate = GetDelegate(); |
+ contents->SetIsResumePending(); |
Maria
2015/07/08 21:02:51
I think it's a bit odd to keep this set if the del
gone
2015/07/08 21:04:45
The current codepath resumes loading of the WebCon
Maria
2015/07/08 21:20:29
Oops, you are right, I misread the code. This is f
jam
2015/07/09 16:50:28
it seems there's no need for a function, and this
gone
2015/07/09 17:11:49
Done.
|
if (!delegate || delegate->ShouldResumeRequestsForCreatedWindow()) |
contents->ResumeLoadingCreatedWebContents(); |
@@ -2667,8 +2669,11 @@ void WebContentsImpl::ExitFullscreen() { |
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(); |
+ if (is_resume_pending_) { |
jam
2015/07/09 16:50:28
shouldn't this be a CHECK(is_resume_pending_)?
gone
2015/07/09 17:11:49
It could be, but that'd require exposing an IsResu
jam
2015/07/10 16:35:41
oh, the java side always calls through to this eve
|
+ is_resume_pending_ = false; |
+ GetRenderViewHost()->Init(); |
+ GetMainFrame()->Init(); |
+ } |
} |
bool WebContentsImpl::FocusLocationBarByDefault() { |