| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 virtual bool allowDatabase(blink::WebFrame* frame, | 52 virtual bool allowDatabase(blink::WebFrame* frame, |
| 53 const blink::WebString& name, | 53 const blink::WebString& name, |
| 54 const blink::WebString& display_name, | 54 const blink::WebString& display_name, |
| 55 unsigned long estimated_size); | 55 unsigned long estimated_size); |
| 56 virtual bool allowFileSystem(blink::WebFrame* frame); | 56 virtual bool allowFileSystem(blink::WebFrame* frame); |
| 57 virtual void requestFileSystemAccess( |
| 58 blink::WebFrame* frame, |
| 59 const blink::WebPermissionCallbacks& callbacks); |
| 57 virtual bool allowImage(blink::WebFrame* frame, | 60 virtual bool allowImage(blink::WebFrame* frame, |
| 58 bool enabled_per_settings, | 61 bool enabled_per_settings, |
| 59 const blink::WebURL& image_url); | 62 const blink::WebURL& image_url); |
| 60 virtual bool allowIndexedDB(blink::WebFrame* frame, | 63 virtual bool allowIndexedDB(blink::WebFrame* frame, |
| 61 const blink::WebString& name, | 64 const blink::WebString& name, |
| 62 const blink::WebSecurityOrigin& origin); | 65 const blink::WebSecurityOrigin& origin); |
| 63 virtual bool allowPlugins(blink::WebFrame* frame, | 66 virtual bool allowPlugins(blink::WebFrame* frame, |
| 64 bool enabled_per_settings); | 67 bool enabled_per_settings); |
| 65 virtual bool allowScript(blink::WebFrame* frame, | 68 virtual bool allowScript(blink::WebFrame* frame, |
| 66 bool enabled_per_settings); | 69 bool enabled_per_settings); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 105 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 103 virtual void DidCommitProvisionalLoad(bool is_new_navigation) OVERRIDE; | 106 virtual void DidCommitProvisionalLoad(bool is_new_navigation) OVERRIDE; |
| 104 | 107 |
| 105 // Message handlers. | 108 // Message handlers. |
| 106 void OnLoadBlockedPlugins(const std::string& identifier); | 109 void OnLoadBlockedPlugins(const std::string& identifier); |
| 107 void OnSetAsInterstitial(); | 110 void OnSetAsInterstitial(); |
| 108 void OnNPAPINotSupported(); | 111 void OnNPAPINotSupported(); |
| 109 void OnSetAllowDisplayingInsecureContent(bool allow); | 112 void OnSetAllowDisplayingInsecureContent(bool allow); |
| 110 void OnSetAllowRunningInsecureContent(bool allow); | 113 void OnSetAllowRunningInsecureContent(bool allow); |
| 111 void OnReloadFrame(); | 114 void OnReloadFrame(); |
| 115 void OnRequestFileSystemAccessACK(int request_id, bool allowed); |
| 112 | 116 |
| 113 // Resets the |content_blocked_| array. | 117 // Resets the |content_blocked_| array. |
| 114 void ClearBlockedContentSettings(); | 118 void ClearBlockedContentSettings(); |
| 115 | 119 |
| 116 // If |origin| corresponds to an installed extension, returns that extension. | 120 // If |origin| corresponds to an installed extension, returns that extension. |
| 117 // Otherwise returns NULL. | 121 // Otherwise returns NULL. |
| 118 const extensions::Extension* GetExtension( | 122 const extensions::Extension* GetExtension( |
| 119 const blink::WebSecurityOrigin& origin) const; | 123 const blink::WebSecurityOrigin& origin) const; |
| 120 | 124 |
| 121 // Helpers. | 125 // Helpers. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 149 std::map<blink::WebFrame*, bool> cached_script_permissions_; | 153 std::map<blink::WebFrame*, bool> cached_script_permissions_; |
| 150 | 154 |
| 151 std::set<std::string> temporarily_allowed_plugins_; | 155 std::set<std::string> temporarily_allowed_plugins_; |
| 152 bool is_interstitial_page_; | 156 bool is_interstitial_page_; |
| 153 bool npapi_plugins_blocked_; | 157 bool npapi_plugins_blocked_; |
| 154 | 158 |
| 155 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 159 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 162 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| OLD | NEW |