Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11090068: When starting a provisional load include the parent frame ID in the IPC and pass it down the th WCO… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updatess Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 return; 1992 return;
1993 1993
1994 WebIntentsDispatcherImpl* intents_dispatcher = 1994 WebIntentsDispatcherImpl* intents_dispatcher =
1995 new WebIntentsDispatcherImpl(this, intent, intent_id); 1995 new WebIntentsDispatcherImpl(this, intent, intent_id);
1996 delegate_->WebIntentDispatch(this, intents_dispatcher); 1996 delegate_->WebIntentDispatch(this, intents_dispatcher);
1997 } 1997 }
1998 1998
1999 void WebContentsImpl::DidStartProvisionalLoadForFrame( 1999 void WebContentsImpl::DidStartProvisionalLoadForFrame(
2000 content::RenderViewHost* render_view_host, 2000 content::RenderViewHost* render_view_host,
2001 int64 frame_id, 2001 int64 frame_id,
2002 int64 parent_frame_id,
2002 bool is_main_frame, 2003 bool is_main_frame,
2003 const GURL& opener_url, 2004 const GURL& opener_url,
2004 const GURL& url) { 2005 const GURL& url) {
2005 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL); 2006 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL);
2006 GURL validated_url(url); 2007 GURL validated_url(url);
2007 GURL validated_opener_url(opener_url); 2008 GURL validated_opener_url(opener_url);
2008 content::RenderProcessHost* render_process_host = 2009 content::RenderProcessHost* render_process_host =
2009 render_view_host->GetProcess(); 2010 render_view_host->GetProcess();
2010 RenderViewHost::FilterURL( 2011 RenderViewHost::FilterURL(
2011 render_process_host->GetID(), 2012 render_process_host->GetID(),
2012 false, 2013 false,
2013 &validated_url); 2014 &validated_url);
2014 RenderViewHost::FilterURL( 2015 RenderViewHost::FilterURL(
2015 render_process_host->GetID(), 2016 render_process_host->GetID(),
2016 true, 2017 true,
2017 &validated_opener_url); 2018 &validated_opener_url);
2018 2019
2019 // Notify observers about the start of the provisional load. 2020 // Notify observers about the start of the provisional load.
2020 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2021 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2021 DidStartProvisionalLoadForFrame(frame_id, is_main_frame, 2022 DidStartProvisionalLoadForFrame(frame_id, parent_frame_id,
2022 validated_url, is_error_page, render_view_host)); 2023 is_main_frame, validated_url, is_error_page,
2024 render_view_host));
2023 2025
2024 if (is_main_frame) { 2026 if (is_main_frame) {
2025 // Notify observers about the provisional change in the main frame URL. 2027 // Notify observers about the provisional change in the main frame URL.
2026 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2028 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2027 ProvisionalChangeToMainFrameUrl(validated_url, 2029 ProvisionalChangeToMainFrameUrl(validated_url,
2028 validated_opener_url, 2030 validated_opener_url,
2029 render_view_host)); 2031 render_view_host));
2030 } 2032 }
2031 } 2033 }
2032 2034
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
3402 } 3404 }
3403 } 3405 }
3404 3406
3405 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3407 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3406 return browser_plugin_guest_.get(); 3408 return browser_plugin_guest_.get();
3407 } 3409 }
3408 3410
3409 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3411 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3410 return browser_plugin_embedder_.get(); 3412 return browser_plugin_embedder_.get();
3411 } 3413 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698