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 4961c866dc7e3cd00cef3237427bac93d77e642a..c872c14071a6f3ade7ca266b59e489dd2e50c630 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -2026,6 +2026,14 @@ void WebContentsImpl::DidStartProvisionalLoad( |
| if (is_main_frame) |
| DidChangeLoadProgress(0); |
| + // --site-per-process mode has a short-term hack allowing cross-process |
| + // subframe pages to commit thinking they are top-level. Correct it here to |
| + // avoid confusing the observers. |
|
nasko
2014/03/06 04:59:52
Do we need this for each observer method? Or do yo
Charlie Reis
2014/03/06 06:59:50
I'm just adding it on demand to satisfy the Web Na
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess) && |
| + render_frame_host != GetMainFrame()) { |
| + is_main_frame = false; |
| + } |
| + |
| // Notify observers about the start of the provisional load. |
| FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| DidStartProvisionalLoadForFrame( |
| @@ -2097,7 +2105,9 @@ void WebContentsImpl::DidStartNavigationToPendingEntry( |
| DidStartNavigationToPendingEntry(url, reload_type)); |
| } |
| -void WebContentsImpl::RequestOpenURL(const OpenURLParams& params) { |
| +void WebContentsImpl::RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
| + const OpenURLParams& params) { |
| + int source_render_frame_id = render_frame_host->GetRoutingID(); |
| WebContents* new_contents = OpenURL(params); |
| if (new_contents) { |
| @@ -2108,7 +2118,7 @@ void WebContentsImpl::RequestOpenURL(const OpenURLParams& params) { |
| params.referrer, |
| params.disposition, |
| params.transition, |
| - params.source_frame_id)); |
| + source_render_frame_id)); |
| } |
| } |