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

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

Issue 8613004: Add OVERRIDE to chrome/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); 60 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings);
61 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); 61 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
62 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings, 62 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings,
63 const WebKit::WebURL& script_url); 63 const WebKit::WebURL& script_url);
64 bool AllowStorage(WebKit::WebFrame* frame, bool local); 64 bool AllowStorage(WebKit::WebFrame* frame, bool local);
65 void DidNotAllowPlugins(WebKit::WebFrame* frame); 65 void DidNotAllowPlugins(WebKit::WebFrame* frame);
66 void DidNotAllowScript(WebKit::WebFrame* frame); 66 void DidNotAllowScript(WebKit::WebFrame* frame);
67 67
68 private: 68 private:
69 // RenderViewObserver implementation. 69 // RenderViewObserver implementation.
70 virtual bool OnMessageReceived(const IPC::Message& message); 70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
71 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, 71 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame,
72 bool is_new_navigation); 72 bool is_new_navigation) OVERRIDE;
73 73
74 // Message handlers. 74 // Message handlers.
75 void OnLoadBlockedPlugins(); 75 void OnLoadBlockedPlugins();
76 76
77 // Resets the |content_blocked_| array. 77 // Resets the |content_blocked_| array.
78 void ClearBlockedContentSettings(); 78 void ClearBlockedContentSettings();
79 79
80 // A pointer to content setting rules stored by the renderer. Normally, the 80 // A pointer to content setting rules stored by the renderer. Normally, the
81 // |RendererContentSettingRules| object is owned by 81 // |RendererContentSettingRules| object is owned by
82 // |ChromeRenderProcessObserver|. In the tests it is owned by the caller of 82 // |ChromeRenderProcessObserver|. In the tests it is owned by the caller of
83 // |SetContentSettingRules|. 83 // |SetContentSettingRules|.
84 const RendererContentSettingRules* content_setting_rules_; 84 const RendererContentSettingRules* content_setting_rules_;
85 85
86 // Stores if images, scripts, and plugins have actually been blocked. 86 // Stores if images, scripts, and plugins have actually been blocked.
87 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; 87 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES];
88 88
89 // Caches the result of AllowStorage. 89 // Caches the result of AllowStorage.
90 typedef std::pair<GURL, bool> StoragePermissionsKey; 90 typedef std::pair<GURL, bool> StoragePermissionsKey;
91 std::map<StoragePermissionsKey, bool> cached_storage_permissions_; 91 std::map<StoragePermissionsKey, bool> cached_storage_permissions_;
92 92
93 // Caches the result of |AllowScript|. 93 // Caches the result of |AllowScript|.
94 std::map<WebKit::WebFrame*, bool> cached_script_permissions_; 94 std::map<WebKit::WebFrame*, bool> cached_script_permissions_;
95 95
96 bool plugins_temporarily_allowed_; 96 bool plugins_temporarily_allowed_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); 98 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
99 }; 99 };
100 100
101 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 101 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.h ('k') | chrome/renderer/extensions/chrome_v8_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698