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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void SetContentSettingRules( | 48 void SetContentSettingRules( |
49 const RendererContentSettingRules* content_setting_rules); | 49 const RendererContentSettingRules* content_setting_rules); |
50 | 50 |
51 bool IsPluginTemporarilyAllowed(const std::string& identifier); | 51 bool IsPluginTemporarilyAllowed(const std::string& identifier); |
52 | 52 |
53 // Sends an IPC notification that the specified content type was blocked. | 53 // Sends an IPC notification that the specified content type was blocked. |
54 void DidBlockContentType(ContentSettingsType settings_type); | 54 void DidBlockContentType(ContentSettingsType settings_type); |
55 | 55 |
56 // Sends an IPC notification that the specified content type was blocked | 56 // Sends an IPC notification that the specified content type was blocked |
57 // with additional metadata. | 57 // with additional metadata. |
| 58 // |
| 59 // When |settings_type| is CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, the |
| 60 // browser process expects |details| to contain a valid GURL |
| 61 // describing the mixed script that was run. |
58 void DidBlockContentType(ContentSettingsType settings_type, | 62 void DidBlockContentType(ContentSettingsType settings_type, |
59 const base::string16& details); | 63 const base::string16& details); |
60 | 64 |
61 // blink::WebContentSettingsClient implementation. | 65 // blink::WebContentSettingsClient implementation. |
62 bool allowDatabase(const blink::WebString& name, | 66 bool allowDatabase(const blink::WebString& name, |
63 const blink::WebString& display_name, | 67 const blink::WebString& display_name, |
64 unsigned long estimated_size) override; | 68 unsigned long estimated_size) override; |
65 void requestFileSystemAccessAsync( | 69 void requestFileSystemAccessAsync( |
66 const blink::WebContentSettingCallbacks& callbacks) override; | 70 const blink::WebContentSettingCallbacks& callbacks) override; |
67 bool allowImage(bool enabled_per_settings, | 71 bool allowImage(bool enabled_per_settings, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 typedef std::map<int, blink::WebContentSettingCallbacks> PermissionRequestMap; | 163 typedef std::map<int, blink::WebContentSettingCallbacks> PermissionRequestMap; |
160 PermissionRequestMap permission_requests_; | 164 PermissionRequestMap permission_requests_; |
161 | 165 |
162 // If true, IsWhitelistedForContentSettings will always return true. | 166 // If true, IsWhitelistedForContentSettings will always return true. |
163 const bool should_whitelist_; | 167 const bool should_whitelist_; |
164 | 168 |
165 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 169 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
166 }; | 170 }; |
167 | 171 |
168 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 172 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
OLD | NEW |