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

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

Issue 216983003: Chrome side changes to removing WebFrame parameter from WebPermissionClient, since it's redundant n… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: review comments Created 6 years, 8 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 | Annotate | Revision Log
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
49 void DidBlockContentType(ContentSettingsType settings_type); 49 void DidBlockContentType(ContentSettingsType settings_type);
50 50
51 // blink::WebPermissionClient implementation. 51 // blink::WebPermissionClient implementation.
52 // TODO(jam): remove all these methods after Blink rolls.
52 virtual bool allowDatabase(blink::WebFrame* frame, 53 virtual bool allowDatabase(blink::WebFrame* frame,
53 const blink::WebString& name, 54 const blink::WebString& name,
54 const blink::WebString& display_name, 55 const blink::WebString& display_name,
55 unsigned long estimated_size); 56 unsigned long estimated_size);
56 virtual bool allowFileSystem(blink::WebFrame* frame); 57 virtual bool allowFileSystem(blink::WebFrame* frame);
57 virtual bool allowImage(blink::WebFrame* frame, 58 virtual bool allowImage(blink::WebFrame* frame,
58 bool enabled_per_settings, 59 bool enabled_per_settings,
59 const blink::WebURL& image_url); 60 const blink::WebURL& image_url);
60 virtual bool allowIndexedDB(blink::WebFrame* frame, 61 virtual bool allowIndexedDB(blink::WebFrame* frame,
61 const blink::WebString& name, 62 const blink::WebString& name,
(...skipping 20 matching lines...) Expand all
82 blink::WebFrame* frame, 83 blink::WebFrame* frame,
83 bool allowed_per_settings, 84 bool allowed_per_settings,
84 const blink::WebSecurityOrigin& context, 85 const blink::WebSecurityOrigin& context,
85 const blink::WebURL& url); 86 const blink::WebURL& url);
86 virtual bool allowRunningInsecureContent( 87 virtual bool allowRunningInsecureContent(
87 blink::WebFrame* frame, 88 blink::WebFrame* frame,
88 bool allowed_per_settings, 89 bool allowed_per_settings,
89 const blink::WebSecurityOrigin& context, 90 const blink::WebSecurityOrigin& context,
90 const blink::WebURL& url); 91 const blink::WebURL& url);
91 92
93 virtual bool allowDatabase(const blink::WebString& name,
94 const blink::WebString& display_name,
95 unsigned long estimated_size);
96 virtual bool allowFileSystem();
97 virtual bool allowImage(bool enabled_per_settings,
98 const blink::WebURL& image_url);
99 virtual bool allowIndexedDB(const blink::WebString& name,
100 const blink::WebSecurityOrigin& origin);
101 virtual bool allowPlugins(bool enabled_per_settings);
102 virtual bool allowScript(bool enabled_per_settings);
103 virtual bool allowScriptFromSource(bool enabled_per_settings,
104 const blink::WebURL& script_url);
105 virtual bool allowStorage(bool local);
106 virtual bool allowReadFromClipboard(bool default_value);
107 virtual bool allowWriteToClipboard(bool default_value);
108 virtual bool allowWebComponents(bool default_value);
109 virtual bool allowMutationEvents(bool default_value);
110 virtual bool allowPushState();
111 virtual void didNotAllowPlugins();
112 virtual void didNotAllowScript();
113 virtual bool allowDisplayingInsecureContent(
114 bool allowed_per_settings,
115 const blink::WebSecurityOrigin& context,
116 const blink::WebURL& url);
117 virtual bool allowRunningInsecureContent(
118 bool allowed_per_settings,
119 const blink::WebSecurityOrigin& context,
120 const blink::WebURL& url);
121
92 // This is used for cases when the NPAPI plugins malfunction if used. 122 // This is used for cases when the NPAPI plugins malfunction if used.
93 bool AreNPAPIPluginsBlocked() const; 123 bool AreNPAPIPluginsBlocked() const;
94 124
95 private: 125 private:
96 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); 126 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);
97 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, 127 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest,
98 ContentSettingsInterstitialPages); 128 ContentSettingsInterstitialPages);
99 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed); 129 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed);
100 130
101 // RenderFrameObserver implementation. 131 // RenderFrameObserver implementation.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 std::map<blink::WebFrame*, bool> cached_script_permissions_; 179 std::map<blink::WebFrame*, bool> cached_script_permissions_;
150 180
151 std::set<std::string> temporarily_allowed_plugins_; 181 std::set<std::string> temporarily_allowed_plugins_;
152 bool is_interstitial_page_; 182 bool is_interstitial_page_;
153 bool npapi_plugins_blocked_; 183 bool npapi_plugins_blocked_;
154 184
155 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); 185 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
156 }; 186 };
157 187
158 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 188 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_permission_client.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698