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" |
11 #include "base/supports_user_data.h" | 11 #include "base/supports_user_data.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/browser/zoom_level_delegate.h" |
13 #include "content/public/common/push_messaging_status.h" | 14 #include "content/public/common/push_messaging_status.h" |
14 | 15 |
15 class GURL; | 16 class GURL; |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class FilePath; | 19 class FilePath; |
19 } | 20 } |
20 | 21 |
21 namespace storage { | 22 namespace storage { |
22 class ExternalMountPoints; | 23 class ExternalMountPoints; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // thread before they use BrowserContext, they should call this to make sure | 105 // thread before they use BrowserContext, they should call this to make sure |
105 // that the ResourceContext is ready. | 106 // that the ResourceContext is ready. |
106 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 107 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
107 | 108 |
108 // Tells the HTML5 objects on this context to persist their session state | 109 // Tells the HTML5 objects on this context to persist their session state |
109 // across the next restart. | 110 // across the next restart. |
110 static void SaveSessionState(BrowserContext* browser_context); | 111 static void SaveSessionState(BrowserContext* browser_context); |
111 | 112 |
112 ~BrowserContext() override; | 113 ~BrowserContext() override; |
113 | 114 |
| 115 // Creates a delegate to initialize a HostZoomMap and persist its information. |
| 116 // This is called during creation of each StoragePartition. |
| 117 virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
| 118 const base::FilePath& partition_path) = 0; |
| 119 |
114 // Returns the path of the directory where this context's data is stored. | 120 // Returns the path of the directory where this context's data is stored. |
115 virtual base::FilePath GetPath() const = 0; | 121 virtual base::FilePath GetPath() const = 0; |
116 | 122 |
117 // Return whether this context is incognito. Default is false. | 123 // Return whether this context is incognito. Default is false. |
118 virtual bool IsOffTheRecord() const = 0; | 124 virtual bool IsOffTheRecord() const = 0; |
119 | 125 |
120 // Returns the request context information associated with this context. Call | 126 // Returns the request context information associated with this context. Call |
121 // this only on the UI thread, since it can send notifications that should | 127 // this only on the UI thread, since it can send notifications that should |
122 // happen on the UI thread. | 128 // happen on the UI thread. |
123 // TODO(creis): Remove this version in favor of the one below. | 129 // TODO(creis): Remove this version in favor of the one below. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 virtual PushMessagingService* GetPushMessagingService() = 0; | 170 virtual PushMessagingService* GetPushMessagingService() = 0; |
165 | 171 |
166 // Returns the SSL host state decisions for this context. The context may | 172 // Returns the SSL host state decisions for this context. The context may |
167 // return NULL, implementing the default exception storage strategy. | 173 // return NULL, implementing the default exception storage strategy. |
168 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; | 174 virtual SSLHostStateDelegate* GetSSLHostStateDelegate() = 0; |
169 }; | 175 }; |
170 | 176 |
171 } // namespace content | 177 } // namespace content |
172 | 178 |
173 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 179 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |