| 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_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 // Called when a specific file system in the current page was accessed. | 145 // Called when a specific file system in the current page was accessed. |
| 146 // If access was blocked due to the user's content settings, | 146 // If access was blocked due to the user's content settings, |
| 147 // |blocked_by_policy| should be true, and this function should invoke | 147 // |blocked_by_policy| should be true, and this function should invoke |
| 148 // OnContentBlocked. | 148 // OnContentBlocked. |
| 149 static void FileSystemAccessed(int render_process_id, | 149 static void FileSystemAccessed(int render_process_id, |
| 150 int render_frame_id, | 150 int render_frame_id, |
| 151 const GURL& url, | 151 const GURL& url, |
| 152 bool blocked_by_policy); | 152 bool blocked_by_policy); |
| 153 | 153 |
| 154 // Called when a specific Service Worker scope was accessed. |
| 155 // If access was blocked due to the user's content settings, |
| 156 // |blocked_by_policy| should be true, and this function should invoke |
| 157 // OnContentBlocked. |
| 158 static void ServiceWorkerAccessed(int render_process_id, |
| 159 int render_frame_id, |
| 160 const GURL& scope, |
| 161 bool blocked_by_policy); |
| 162 |
| 154 // Resets the |content_blocked_| and |content_allowed_| arrays, except for | 163 // Resets the |content_blocked_| and |content_allowed_| arrays, except for |
| 155 // CONTENT_SETTINGS_TYPE_COOKIES related information. | 164 // CONTENT_SETTINGS_TYPE_COOKIES related information. |
| 156 // TODO(vabr): Only public for tests. Move to a test client. | 165 // TODO(vabr): Only public for tests. Move to a test client. |
| 157 void ClearBlockedContentSettingsExceptForCookies(); | 166 void ClearBlockedContentSettingsExceptForCookies(); |
| 158 | 167 |
| 159 // Resets all cookies related information. | 168 // Resets all cookies related information. |
| 160 // TODO(vabr): Only public for tests. Move to a test client. | 169 // TODO(vabr): Only public for tests. Move to a test client. |
| 161 void ClearCookieSpecificContentSettings(); | 170 void ClearCookieSpecificContentSettings(); |
| 162 | 171 |
| 163 // Changes the |content_blocked_| entry for popups. | 172 // Changes the |content_blocked_| entry for popups. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 const net::CookieOptions& options, | 318 const net::CookieOptions& options, |
| 310 bool blocked_by_policy); | 319 bool blocked_by_policy); |
| 311 void OnFileSystemAccessed(const GURL& url, | 320 void OnFileSystemAccessed(const GURL& url, |
| 312 bool blocked_by_policy); | 321 bool blocked_by_policy); |
| 313 void OnIndexedDBAccessed(const GURL& url, | 322 void OnIndexedDBAccessed(const GURL& url, |
| 314 const base::string16& description, | 323 const base::string16& description, |
| 315 bool blocked_by_policy); | 324 bool blocked_by_policy); |
| 316 void OnLocalStorageAccessed(const GURL& url, | 325 void OnLocalStorageAccessed(const GURL& url, |
| 317 bool local, | 326 bool local, |
| 318 bool blocked_by_policy); | 327 bool blocked_by_policy); |
| 328 void OnServiceWorkerAccessed(const GURL& scope, bool blocked_by_policy); |
| 319 void OnWebDatabaseAccessed(const GURL& url, | 329 void OnWebDatabaseAccessed(const GURL& url, |
| 320 const base::string16& name, | 330 const base::string16& name, |
| 321 const base::string16& display_name, | 331 const base::string16& display_name, |
| 322 bool blocked_by_policy); | 332 bool blocked_by_policy); |
| 323 void OnGeolocationPermissionSet(const GURL& requesting_frame, | 333 void OnGeolocationPermissionSet(const GURL& requesting_frame, |
| 324 bool allowed); | 334 bool allowed); |
| 325 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 335 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 326 void OnProtectedMediaIdentifierPermissionSet(const GURL& requesting_frame, | 336 void OnProtectedMediaIdentifierPermissionSet(const GURL& requesting_frame, |
| 327 bool allowed); | 337 bool allowed); |
| 328 #endif | 338 #endif |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 std::string media_stream_requested_audio_device_; | 460 std::string media_stream_requested_audio_device_; |
| 451 std::string media_stream_requested_video_device_; | 461 std::string media_stream_requested_video_device_; |
| 452 | 462 |
| 453 // Observer to watch for content settings changed. | 463 // Observer to watch for content settings changed. |
| 454 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 464 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
| 455 | 465 |
| 456 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 466 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 457 }; | 467 }; |
| 458 | 468 |
| 459 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 469 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |