| 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 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 class BlobHandle; | 34 class BlobHandle; |
| 35 class BrowserPluginGuestManager; | 35 class BrowserPluginGuestManager; |
| 36 class DownloadManager; | 36 class DownloadManager; |
| 37 class DownloadManagerDelegate; | 37 class DownloadManagerDelegate; |
| 38 class IndexedDBContext; | 38 class IndexedDBContext; |
| 39 class PushMessagingService; | 39 class PushMessagingService; |
| 40 class ResourceContext; | 40 class ResourceContext; |
| 41 class SiteInstance; | 41 class SiteInstance; |
| 42 class StoragePartition; | 42 class StoragePartition; |
| 43 class SSLHostStateDelegate; |
| 43 | 44 |
| 44 // This class holds the context needed for a browsing session. | 45 // This class holds the context needed for a browsing session. |
| 45 // It lives on the UI thread. All these methods must only be called on the UI | 46 // It lives on the UI thread. All these methods must only be called on the UI |
| 46 // thread. | 47 // thread. |
| 47 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { | 48 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
| 48 public: | 49 public: |
| 49 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); | 50 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
| 50 | 51 |
| 51 // Returns BrowserContext specific external mount points. It may return NULL | 52 // Returns BrowserContext specific external mount points. It may return NULL |
| 52 // if the context doesn't have any BrowserContext specific external mount | 53 // if the context doesn't have any BrowserContext specific external mount |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Returns the guest manager for this context. | 143 // Returns the guest manager for this context. |
| 143 virtual BrowserPluginGuestManager* GetGuestManager() = 0; | 144 virtual BrowserPluginGuestManager* GetGuestManager() = 0; |
| 144 | 145 |
| 145 // Returns a special storage policy implementation, or NULL. | 146 // Returns a special storage policy implementation, or NULL. |
| 146 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0; | 147 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0; |
| 147 | 148 |
| 148 // Returns a push messaging service. The embedder owns the service, and is | 149 // Returns a push messaging service. The embedder owns the service, and is |
| 149 // responsible for ensuring that it outlives RenderProcessHost. It's valid to | 150 // responsible for ensuring that it outlives RenderProcessHost. It's valid to |
| 150 // return NULL. | 151 // return NULL. |
| 151 virtual PushMessagingService* GetPushMessagingService() = 0; | 152 virtual PushMessagingService* GetPushMessagingService() = 0; |
| 153 |
| 154 // Returns the SSL host state decisions for this context. The context may |
| 155 // return NULL, implementing the default exception storage strategy. |
| 156 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; |
| 152 }; | 157 }; |
| 153 | 158 |
| 154 } // namespace content | 159 } // namespace content |
| 155 | 160 |
| 156 #if defined(COMPILER_GCC) | 161 #if defined(COMPILER_GCC) |
| 157 namespace BASE_HASH_NAMESPACE { | 162 namespace BASE_HASH_NAMESPACE { |
| 158 | 163 |
| 159 template<> | 164 template<> |
| 160 struct hash<content::BrowserContext*> { | 165 struct hash<content::BrowserContext*> { |
| 161 std::size_t operator()(content::BrowserContext* const& p) const { | 166 std::size_t operator()(content::BrowserContext* const& p) const { |
| 162 return reinterpret_cast<std::size_t>(p); | 167 return reinterpret_cast<std::size_t>(p); |
| 163 } | 168 } |
| 164 }; | 169 }; |
| 165 | 170 |
| 166 } // namespace BASE_HASH_NAMESPACE | 171 } // namespace BASE_HASH_NAMESPACE |
| 167 #endif | 172 #endif |
| 168 | 173 |
| 169 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 174 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |