| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Sets the content setting rules which back |AllowImage()|, |AllowScript()|, | 31 // Sets the content setting rules which back |AllowImage()|, |AllowScript()|, |
| 32 // and |AllowScriptFromSource()|. |content_setting_rules| must outlive this | 32 // and |AllowScriptFromSource()|. |content_setting_rules| must outlive this |
| 33 // |ContentSettingsObserver|. | 33 // |ContentSettingsObserver|. |
| 34 void SetContentSettingRules( | 34 void SetContentSettingRules( |
| 35 const RendererContentSettingRules* content_setting_rules); | 35 const RendererContentSettingRules* content_setting_rules); |
| 36 | 36 |
| 37 bool IsPluginTemporarilyAllowed(const std::string& identifier); | 37 bool IsPluginTemporarilyAllowed(const std::string& identifier); |
| 38 | 38 |
| 39 // Sends an IPC notification that the specified content type was blocked. | 39 // Sends an IPC notification that the specified content type was blocked. |
| 40 // If the content type requires it, |resource_identifier| names the specific | 40 void DidBlockContentType(ContentSettingsType settings_type); |
| 41 // resource that was blocked (the plugin path in the case of plugins), | |
| 42 // otherwise it's the empty string. | |
| 43 void DidBlockContentType(ContentSettingsType settings_type, | |
| 44 const std::string& resource_identifier); | |
| 45 | 41 |
| 46 // These correspond to blink::WebPermissionClient methods. | 42 // These correspond to blink::WebPermissionClient methods. |
| 47 bool AllowDatabase(blink::WebFrame* frame, | 43 bool AllowDatabase(blink::WebFrame* frame, |
| 48 const blink::WebString& name, | 44 const blink::WebString& name, |
| 49 const blink::WebString& display_name, | 45 const blink::WebString& display_name, |
| 50 unsigned long estimated_size); | 46 unsigned long estimated_size); |
| 51 bool AllowFileSystem(blink::WebFrame* frame); | 47 bool AllowFileSystem(blink::WebFrame* frame); |
| 52 bool AllowImage(blink::WebFrame* frame, | 48 bool AllowImage(blink::WebFrame* frame, |
| 53 bool enabled_per_settings, | 49 bool enabled_per_settings, |
| 54 const blink::WebURL& image_url); | 50 const blink::WebURL& image_url); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 std::map<blink::WebFrame*, bool> cached_script_permissions_; | 107 std::map<blink::WebFrame*, bool> cached_script_permissions_; |
| 112 | 108 |
| 113 std::set<std::string> temporarily_allowed_plugins_; | 109 std::set<std::string> temporarily_allowed_plugins_; |
| 114 bool is_interstitial_page_; | 110 bool is_interstitial_page_; |
| 115 bool npapi_plugins_blocked_; | 111 bool npapi_plugins_blocked_; |
| 116 | 112 |
| 117 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 113 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
| 118 }; | 114 }; |
| 119 | 115 |
| 120 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 116 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| OLD | NEW |