| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // BrowserContext initializs the corresponding getters when its objects are | 113 // BrowserContext initializs the corresponding getters when its objects are |
| 114 // created, but if the embedder wants to pass the ResourceContext to another | 114 // created, but if the embedder wants to pass the ResourceContext to another |
| 115 // thread before they use BrowserContext, they should call this to make sure | 115 // thread before they use BrowserContext, they should call this to make sure |
| 116 // that the ResourceContext is ready. | 116 // that the ResourceContext is ready. |
| 117 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 117 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
| 118 | 118 |
| 119 // Tells the HTML5 objects on this context to persist their session state | 119 // Tells the HTML5 objects on this context to persist their session state |
| 120 // across the next restart. | 120 // across the next restart. |
| 121 static void SaveSessionState(BrowserContext* browser_context); | 121 static void SaveSessionState(BrowserContext* browser_context); |
| 122 | 122 |
| 123 static void SetDownloadManagerForTesting(BrowserContext* browser_context, |
| 124 DownloadManager* download_manager); |
| 125 |
| 123 ~BrowserContext() override; | 126 ~BrowserContext() override; |
| 124 | 127 |
| 125 // Creates a delegate to initialize a HostZoomMap and persist its information. | 128 // Creates a delegate to initialize a HostZoomMap and persist its information. |
| 126 // This is called during creation of each StoragePartition. | 129 // This is called during creation of each StoragePartition. |
| 127 virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 130 virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
| 128 const base::FilePath& partition_path) = 0; | 131 const base::FilePath& partition_path) = 0; |
| 129 | 132 |
| 130 // Returns the path of the directory where this context's data is stored. | 133 // Returns the path of the directory where this context's data is stored. |
| 131 virtual base::FilePath GetPath() const = 0; | 134 virtual base::FilePath GetPath() const = 0; |
| 132 | 135 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; | 187 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; |
| 185 | 188 |
| 186 // Returns the PermissionManager associated with that context if any, nullptr | 189 // Returns the PermissionManager associated with that context if any, nullptr |
| 187 // otherwise. | 190 // otherwise. |
| 188 virtual PermissionManager* GetPermissionManager() = 0; | 191 virtual PermissionManager* GetPermissionManager() = 0; |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 } // namespace content | 194 } // namespace content |
| 192 | 195 |
| 193 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 196 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |