OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <set> |
| 10 #include <string> |
| 11 |
9 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
10 #include "chrome/browser/geolocation/geolocation_settings_state.h" | 13 #include "chrome/browser/geolocation/geolocation_settings_state.h" |
11 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
12 #include "chrome/common/content_settings_types.h" | 15 #include "chrome/common/content_settings_types.h" |
13 #include "content/browser/tab_contents/tab_contents_observer.h" | 16 #include "content/browser/tab_contents/tab_contents_observer.h" |
14 #include "content/common/dom_storage_common.h" | 17 #include "content/common/dom_storage_common.h" |
15 #include "content/common/notification_observer.h" | 18 #include "content/common/notification_observer.h" |
16 #include "content/common/notification_registrar.h" | 19 #include "content/common/notification_registrar.h" |
17 | 20 |
18 class CannedBrowsingDataAppCacheHelper; | 21 class CannedBrowsingDataAppCacheHelper; |
| 22 class CannedBrowsingDataCookieHelper; |
19 class CannedBrowsingDataDatabaseHelper; | 23 class CannedBrowsingDataDatabaseHelper; |
20 class CannedBrowsingDataFileSystemHelper; | 24 class CannedBrowsingDataFileSystemHelper; |
21 class CannedBrowsingDataIndexedDBHelper; | 25 class CannedBrowsingDataIndexedDBHelper; |
22 class CannedBrowsingDataLocalStorageHelper; | 26 class CannedBrowsingDataLocalStorageHelper; |
23 class CookiesTreeModel; | 27 class CookiesTreeModel; |
24 class TabContents; | 28 class TabContents; |
25 class Profile; | 29 class Profile; |
26 struct ContentSettings; | 30 struct ContentSettings; |
27 | 31 |
28 namespace net { | 32 namespace net { |
29 class CookieList; | 33 class CookieList; |
30 class CookieMonster; | |
31 class CookieOptions; | 34 class CookieOptions; |
32 } | 35 } |
33 | 36 |
34 class TabSpecificContentSettings : public TabContentsObserver, | 37 class TabSpecificContentSettings : public TabContentsObserver, |
35 public NotificationObserver { | 38 public NotificationObserver { |
36 public: | 39 public: |
37 explicit TabSpecificContentSettings(TabContents* tab); | 40 explicit TabSpecificContentSettings(TabContents* tab); |
38 | 41 |
39 virtual ~TabSpecificContentSettings(); | 42 virtual ~TabSpecificContentSettings(); |
40 | 43 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 201 |
199 private: | 202 private: |
200 class LocalSharedObjectsContainer { | 203 class LocalSharedObjectsContainer { |
201 public: | 204 public: |
202 explicit LocalSharedObjectsContainer(Profile* profile); | 205 explicit LocalSharedObjectsContainer(Profile* profile); |
203 ~LocalSharedObjectsContainer(); | 206 ~LocalSharedObjectsContainer(); |
204 | 207 |
205 // Empties the container. | 208 // Empties the container. |
206 void Reset(); | 209 void Reset(); |
207 | 210 |
208 net::CookieMonster* cookies() const { return cookies_; } | |
209 CannedBrowsingDataAppCacheHelper* appcaches() const { | 211 CannedBrowsingDataAppCacheHelper* appcaches() const { |
210 return appcaches_; | 212 return appcaches_; |
211 } | 213 } |
| 214 CannedBrowsingDataCookieHelper* cookies() const { |
| 215 return cookies_; |
| 216 } |
212 CannedBrowsingDataDatabaseHelper* databases() const { | 217 CannedBrowsingDataDatabaseHelper* databases() const { |
213 return databases_; | 218 return databases_; |
214 } | 219 } |
215 CannedBrowsingDataFileSystemHelper* file_systems() const { | 220 CannedBrowsingDataFileSystemHelper* file_systems() const { |
216 return file_systems_; | 221 return file_systems_; |
217 } | 222 } |
218 CannedBrowsingDataIndexedDBHelper* indexed_dbs() const { | 223 CannedBrowsingDataIndexedDBHelper* indexed_dbs() const { |
219 return indexed_dbs_; | 224 return indexed_dbs_; |
220 } | 225 } |
221 CannedBrowsingDataLocalStorageHelper* local_storages() const { | 226 CannedBrowsingDataLocalStorageHelper* local_storages() const { |
222 return local_storages_; | 227 return local_storages_; |
223 } | 228 } |
224 CannedBrowsingDataLocalStorageHelper* session_storages() const { | 229 CannedBrowsingDataLocalStorageHelper* session_storages() const { |
225 return session_storages_; | 230 return session_storages_; |
226 } | 231 } |
227 | 232 |
228 CookiesTreeModel* GetCookiesTreeModel(); | 233 CookiesTreeModel* GetCookiesTreeModel(); |
229 | 234 |
230 bool empty() const; | 235 bool empty() const; |
231 | 236 |
232 private: | 237 private: |
233 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); | |
234 | |
235 scoped_refptr<net::CookieMonster> cookies_; | |
236 scoped_refptr<CannedBrowsingDataAppCacheHelper> appcaches_; | 238 scoped_refptr<CannedBrowsingDataAppCacheHelper> appcaches_; |
| 239 scoped_refptr<CannedBrowsingDataCookieHelper> cookies_; |
237 scoped_refptr<CannedBrowsingDataDatabaseHelper> databases_; | 240 scoped_refptr<CannedBrowsingDataDatabaseHelper> databases_; |
238 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; | 241 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; |
239 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; | 242 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; |
240 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; | 243 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; |
241 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; | 244 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; |
| 245 |
| 246 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); |
242 }; | 247 }; |
243 | 248 |
244 void AddBlockedResource(ContentSettingsType content_type, | 249 void AddBlockedResource(ContentSettingsType content_type, |
245 const std::string& resource_identifier); | 250 const std::string& resource_identifier); |
246 | 251 |
247 void OnContentAccessed(ContentSettingsType type); | 252 void OnContentAccessed(ContentSettingsType type); |
248 | 253 |
249 // NotificationObserver implementation. | 254 // NotificationObserver implementation. |
250 virtual void Observe(int type, | 255 virtual void Observe(int type, |
251 const NotificationSource& source, | 256 const NotificationSource& source, |
(...skipping 25 matching lines...) Expand all Loading... |
277 | 282 |
278 // Stores whether the user can load blocked plugins on this page. | 283 // Stores whether the user can load blocked plugins on this page. |
279 bool load_plugins_link_enabled_; | 284 bool load_plugins_link_enabled_; |
280 | 285 |
281 NotificationRegistrar registrar_; | 286 NotificationRegistrar registrar_; |
282 | 287 |
283 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 288 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
284 }; | 289 }; |
285 | 290 |
286 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 291 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
OLD | NEW |