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 CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ResourceContext; | 43 class ResourceContext; |
44 class SpeechRecognitionPreferences; | 44 class SpeechRecognitionPreferences; |
45 | 45 |
46 // This class holds the context needed for a browsing session. | 46 // This class holds the context needed for a browsing session. |
47 // It lives on the UI thread. All these methods must only be called on the UI | 47 // It lives on the UI thread. All these methods must only be called on the UI |
48 // thread. | 48 // thread. |
49 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 49 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
50 public: | 50 public: |
51 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 51 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
52 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); | 52 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); |
| 53 static DOMStorageContext* GetDefaultDOMStorageContext( |
| 54 BrowserContext* browser_context); |
53 static DOMStorageContext* GetDOMStorageContext( | 55 static DOMStorageContext* GetDOMStorageContext( |
54 BrowserContext* browser_context); | 56 BrowserContext* browser_context, int renderer_child_id); |
55 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); | 57 static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); |
56 static webkit_database::DatabaseTracker* GetDatabaseTracker( | 58 static webkit_database::DatabaseTracker* GetDatabaseTracker( |
57 BrowserContext* browser_context); | 59 BrowserContext* browser_context); |
58 static appcache::AppCacheService* GetAppCacheService( | 60 static appcache::AppCacheService* GetAppCacheService( |
59 BrowserContext* browser_context); | 61 BrowserContext* browser_context); |
60 static fileapi::FileSystemContext* GetFileSystemContext( | 62 static fileapi::FileSystemContext* GetFileSystemContext( |
61 BrowserContext* browser_context); | 63 BrowserContext* browser_context); |
62 | 64 |
63 // Ensures that the corresponding ResourceContext is initialized. Normally the | 65 // Ensures that the corresponding ResourceContext is initialized. Normally the |
64 // BrowserContext initializs the corresponding getters when its objects are | 66 // BrowserContext initializs the corresponding getters when its objects are |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 struct hash<content::BrowserContext*> { | 137 struct hash<content::BrowserContext*> { |
136 std::size_t operator()(content::BrowserContext* const& p) const { | 138 std::size_t operator()(content::BrowserContext* const& p) const { |
137 return reinterpret_cast<std::size_t>(p); | 139 return reinterpret_cast<std::size_t>(p); |
138 } | 140 } |
139 }; | 141 }; |
140 | 142 |
141 } // namespace BASE_HASH_NAMESPACE | 143 } // namespace BASE_HASH_NAMESPACE |
142 #endif | 144 #endif |
143 | 145 |
144 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 146 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |