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

Unified Diff: chrome/renderer/content_settings_observer.h

Issue 104833006: Switch ContentSettingsObserver to be a RenderFrameObserver instead of a RenderViewObserver (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/content_settings_observer.h
===================================================================
--- chrome/renderer/content_settings_observer.h (revision 241294)
+++ chrome/renderer/content_settings_observer.h (working copy)
@@ -9,8 +9,8 @@
#include <set>
#include "chrome/common/content_settings.h"
-#include "content/public/renderer/render_view_observer.h"
-#include "content/public/renderer/render_view_observer_tracker.h"
+#include "content/public/renderer/render_frame_observer.h"
+#include "content/public/renderer/render_frame_observer_tracker.h"
#include "extensions/common/permissions/api_permission.h"
#include "third_party/WebKit/public/web/WebPermissionClient.h"
@@ -27,13 +27,13 @@
class Extension;
}
-// Handles blocking content per content settings for each RenderView.
+// Handles blocking content per content settings for each RenderFrame.
class ContentSettingsObserver
- : public content::RenderViewObserver,
- public content::RenderViewObserverTracker<ContentSettingsObserver>,
+ : public content::RenderFrameObserver,
+ public content::RenderFrameObserverTracker<ContentSettingsObserver>,
public blink::WebPermissionClient {
public:
- ContentSettingsObserver(content::RenderView* render_view,
+ ContentSettingsObserver(content::RenderFrame* render_frame,
extensions::Dispatcher* extension_dispatcher);
virtual ~ContentSettingsObserver();
@@ -97,8 +97,10 @@
FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);
FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest,
ContentSettingsInterstitialPages);
+ FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed);
- // RenderViewObserver implementation.
+ // RenderFrameObserver implementation.
+ virtual void WebFrameCreated(blink::WebFrame* frame) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidCommitProvisionalLoad(blink::WebFrame* frame,
bool is_new_navigation) OVERRIDE;
@@ -109,6 +111,7 @@
void OnNPAPINotSupported();
void OnSetAllowDisplayingInsecureContent(bool allow);
void OnSetAllowRunningInsecureContent(bool allow);
+ void OnReloadFrame();
// Resets the |content_blocked_| array.
void ClearBlockedContentSettings();
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698