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

Side by Side Diff: chrome/renderer/content_settings_observer.h

Issue 663333002: Standardize usage of virtual/override/final in chrome/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #ifndef CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 5 #ifndef CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 // Handles blocking content per content settings for each RenderFrame. 30 // Handles blocking content per content settings for each RenderFrame.
31 class ContentSettingsObserver 31 class ContentSettingsObserver
32 : public content::RenderFrameObserver, 32 : public content::RenderFrameObserver,
33 public content::RenderFrameObserverTracker<ContentSettingsObserver>, 33 public content::RenderFrameObserverTracker<ContentSettingsObserver>,
34 public blink::WebPermissionClient { 34 public blink::WebPermissionClient {
35 public: 35 public:
36 ContentSettingsObserver(content::RenderFrame* render_frame, 36 ContentSettingsObserver(content::RenderFrame* render_frame,
37 extensions::Dispatcher* extension_dispatcher); 37 extensions::Dispatcher* extension_dispatcher);
38 virtual ~ContentSettingsObserver(); 38 ~ContentSettingsObserver() override;
39 39
40 // Sets the content setting rules which back |AllowImage()|, |AllowScript()|, 40 // Sets the content setting rules which back |AllowImage()|, |AllowScript()|,
41 // and |AllowScriptFromSource()|. |content_setting_rules| must outlive this 41 // and |AllowScriptFromSource()|. |content_setting_rules| must outlive this
42 // |ContentSettingsObserver|. 42 // |ContentSettingsObserver|.
43 void SetContentSettingRules( 43 void SetContentSettingRules(
44 const RendererContentSettingRules* content_setting_rules); 44 const RendererContentSettingRules* content_setting_rules);
45 45
46 bool IsPluginTemporarilyAllowed(const std::string& identifier); 46 bool IsPluginTemporarilyAllowed(const std::string& identifier);
47 47
48 // Sends an IPC notification that the specified content type was blocked. 48 // Sends an IPC notification that the specified content type was blocked.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // This is used for cases when the NPAPI plugins malfunction if used. 81 // This is used for cases when the NPAPI plugins malfunction if used.
82 bool AreNPAPIPluginsBlocked() const; 82 bool AreNPAPIPluginsBlocked() const;
83 83
84 private: 84 private:
85 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); 85 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);
86 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, 86 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest,
87 ContentSettingsInterstitialPages); 87 ContentSettingsInterstitialPages);
88 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed); 88 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed);
89 89
90 // RenderFrameObserver implementation. 90 // RenderFrameObserver implementation.
91 virtual bool OnMessageReceived(const IPC::Message& message) override; 91 bool OnMessageReceived(const IPC::Message& message) override;
92 virtual void DidCommitProvisionalLoad(bool is_new_navigation) override; 92 void DidCommitProvisionalLoad(bool is_new_navigation) override;
93 93
94 // Message handlers. 94 // Message handlers.
95 void OnLoadBlockedPlugins(const std::string& identifier); 95 void OnLoadBlockedPlugins(const std::string& identifier);
96 void OnSetAsInterstitial(); 96 void OnSetAsInterstitial();
97 void OnNPAPINotSupported(); 97 void OnNPAPINotSupported();
98 void OnSetAllowDisplayingInsecureContent(bool allow); 98 void OnSetAllowDisplayingInsecureContent(bool allow);
99 void OnSetAllowRunningInsecureContent(bool allow); 99 void OnSetAllowRunningInsecureContent(bool allow);
100 void OnReloadFrame(); 100 void OnReloadFrame();
101 void OnRequestFileSystemAccessAsyncResponse(int request_id, bool allowed); 101 void OnRequestFileSystemAccessAsyncResponse(int request_id, bool allowed);
102 102
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool npapi_plugins_blocked_; 150 bool npapi_plugins_blocked_;
151 151
152 int current_request_id_; 152 int current_request_id_;
153 typedef std::map<int, blink::WebPermissionCallbacks> PermissionRequestMap; 153 typedef std::map<int, blink::WebPermissionCallbacks> PermissionRequestMap;
154 PermissionRequestMap permission_requests_; 154 PermissionRequestMap permission_requests_;
155 155
156 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); 156 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
157 }; 157 };
158 158
159 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 159 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.h ('k') | chrome/renderer/extensions/app_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698