| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void ClearBlockedContentSettings(); | 104 void ClearBlockedContentSettings(); |
| 105 | 105 |
| 106 // Whether the observed RenderFrame is for a platform app. | 106 // Whether the observed RenderFrame is for a platform app. |
| 107 bool IsPlatformApp(); | 107 bool IsPlatformApp(); |
| 108 | 108 |
| 109 #if defined(ENABLE_EXTENSIONS) | 109 #if defined(ENABLE_EXTENSIONS) |
| 110 // If |origin| corresponds to an installed extension, returns that extension. | 110 // If |origin| corresponds to an installed extension, returns that extension. |
| 111 // Otherwise returns NULL. | 111 // Otherwise returns NULL. |
| 112 const extensions::Extension* GetExtension( | 112 const extensions::Extension* GetExtension( |
| 113 const blink::WebSecurityOrigin& origin) const; | 113 const blink::WebSecurityOrigin& origin) const; |
| 114 | |
| 115 #endif | 114 #endif |
| 116 | 115 |
| 117 // Helpers. | 116 // Helpers. |
| 118 // True if |frame| contains content that is white-listed for content settings. | 117 // True if |frame| contains content that is white-listed for content settings. |
| 119 static bool IsWhitelistedForContentSettings(content::RenderFrame* frame); | 118 static bool IsWhitelistedForContentSettings(content::RenderFrame* frame); |
| 120 static bool IsWhitelistedForContentSettings( | 119 static bool IsWhitelistedForContentSettings( |
| 121 const blink::WebSecurityOrigin& origin, | 120 const blink::WebSecurityOrigin& origin, |
| 122 const GURL& document_url); | 121 const GURL& document_url); |
| 123 | 122 |
| 124 #if defined(ENABLE_EXTENSIONS) | 123 #if defined(ENABLE_EXTENSIONS) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 151 bool npapi_plugins_blocked_; | 150 bool npapi_plugins_blocked_; |
| 152 | 151 |
| 153 int current_request_id_; | 152 int current_request_id_; |
| 154 typedef std::map<int, blink::WebPermissionCallbacks> PermissionRequestMap; | 153 typedef std::map<int, blink::WebPermissionCallbacks> PermissionRequestMap; |
| 155 PermissionRequestMap permission_requests_; | 154 PermissionRequestMap permission_requests_; |
| 156 | 155 |
| 157 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 156 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
| 158 }; | 157 }; |
| 159 | 158 |
| 160 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 159 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| OLD | NEW |