OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |