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

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: 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
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 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 return; 1990 return;
1991 1991
1992 WebIntentsDispatcherImpl* intents_dispatcher = 1992 WebIntentsDispatcherImpl* intents_dispatcher =
1993 new WebIntentsDispatcherImpl(this, intent, intent_id); 1993 new WebIntentsDispatcherImpl(this, intent, intent_id);
1994 delegate_->WebIntentDispatch(this, intents_dispatcher); 1994 delegate_->WebIntentDispatch(this, intents_dispatcher);
1995 } 1995 }
1996 1996
1997 void WebContentsImpl::DidStartProvisionalLoadForFrame( 1997 void WebContentsImpl::DidStartProvisionalLoadForFrame(
1998 content::RenderViewHost* render_view_host, 1998 content::RenderViewHost* render_view_host,
1999 int64 frame_id, 1999 int64 frame_id,
2000 int64 parent_frame_id,
2000 bool is_main_frame, 2001 bool is_main_frame,
2001 const GURL& opener_url, 2002 const GURL& opener_url,
2002 const GURL& url) { 2003 const GURL& url) {
2003 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL); 2004 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL);
2004 GURL validated_url(url); 2005 GURL validated_url(url);
2005 GURL validated_opener_url(opener_url); 2006 GURL validated_opener_url(opener_url);
2006 content::RenderProcessHost* render_process_host = 2007 content::RenderProcessHost* render_process_host =
2007 render_view_host->GetProcess(); 2008 render_view_host->GetProcess();
2008 RenderViewHost::FilterURL( 2009 RenderViewHost::FilterURL(
2009 render_process_host->GetID(), 2010 render_process_host->GetID(),
2010 false, 2011 false,
2011 &validated_url); 2012 &validated_url);
2012 RenderViewHost::FilterURL( 2013 RenderViewHost::FilterURL(
2013 render_process_host->GetID(), 2014 render_process_host->GetID(),
2014 true, 2015 true,
2015 &validated_opener_url); 2016 &validated_opener_url);
2016 2017
2017 // Notify observers about the start of the provisional load. 2018 // Notify observers about the start of the provisional load.
2018 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2019 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2019 DidStartProvisionalLoadForFrame(frame_id, is_main_frame, 2020 DidStartProvisionalLoadForFrame(frame_id, parent_frame_id,
2020 validated_url, is_error_page, render_view_host)); 2021 is_main_frame, validated_url, is_error_page,
2022 render_view_host));
2021 2023
2022 if (is_main_frame) { 2024 if (is_main_frame) {
2023 // Notify observers about the provisional change in the main frame URL. 2025 // Notify observers about the provisional change in the main frame URL.
2024 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2026 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2025 ProvisionalChangeToMainFrameUrl(validated_url, 2027 ProvisionalChangeToMainFrameUrl(validated_url,
2026 validated_opener_url, 2028 validated_opener_url,
2027 render_view_host)); 2029 render_view_host));
2028 } 2030 }
2029 } 2031 }
2030 2032
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3398 } 3400 }
3399 } 3401 }
3400 3402
3401 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3403 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3402 return browser_plugin_guest_.get(); 3404 return browser_plugin_guest_.get();
3403 } 3405 }
3404 3406
3405 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3407 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3406 return browser_plugin_embedder_.get(); 3408 return browser_plugin_embedder_.get();
3407 } 3409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698