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