diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-03 12:17:48 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-03 12:17:48 +0000 |
commit | e2d2d4206bb147ce253ff07fd98feb3cf4680bad (patch) | |
tree | 33cfc5927dd5fae2adb09a2ca1044da518f7c913 /chrome/browser/content_settings | |
parent | 48b82e7d362d6eabebd12d5373f44cbd852634e2 (diff) | |
download | chromium_src-e2d2d4206bb147ce253ff07fd98feb3cf4680bad.zip chromium_src-e2d2d4206bb147ce253ff07fd98feb3cf4680bad.tar.gz chromium_src-e2d2d4206bb147ce253ff07fd98feb3cf4680bad.tar.bz2 |
Update several WebContentsObserver loading callbacks to use RFH.
This code runs in the browser process, so there's no need to pass
around routing IDs for frames, since it can just use RFH directly.
This also simplifies the callbacks by removing several parameters
that are now redundant with RFH. This has the side effect of
making it impossible for tests to supply 'impossible' data to
WebContentsObserver callbacks.
Tests for WebContentsObserver loading callbacks can use the new
RenderFrameHostTester helper if they need to create subframe
RenderFrameHosts.
R=jam@chromium.org
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/365563002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings')
-rw-r--r-- | chrome/browser/content_settings/tab_specific_content_settings.cc | 9 | ||||
-rw-r--r-- | chrome/browser/content_settings/tab_specific_content_settings.h | 7 |
2 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc index 7de878d..7353664 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.cc +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc @@ -661,14 +661,11 @@ void TabSpecificContentSettings::DidNavigateMainFrame( } void TabSpecificContentSettings::DidStartProvisionalLoadForFrame( - int64 frame_id, - int64 parent_frame_id, - bool is_main_frame, + content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, - bool is_iframe_srcdoc, - RenderViewHost* render_view_host) { - if (!is_main_frame) + bool is_iframe_srcdoc) { + if (render_frame_host->GetParent()) return; // If we're displaying a network error page do not reset the content diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h index 063faa9..4375eb7 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.h +++ b/chrome/browser/content_settings/tab_specific_content_settings.h @@ -290,13 +290,10 @@ class TabSpecificContentSettings const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) OVERRIDE; virtual void DidStartProvisionalLoadForFrame( - int64 frame_id, - int64 parent_frame_id, - bool is_main_frame, + content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, - bool is_iframe_srcdoc, - content::RenderViewHost* render_view_host) OVERRIDE; + bool is_iframe_srcdoc) OVERRIDE; virtual void AppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy) OVERRIDE; |