| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
| 17 #include "base/containers/hash_tables.h" | 17 #include "base/containers/hash_tables.h" |
| 18 #include "base/memory/linked_ptr.h" | 18 #include "base/memory/linked_ptr.h" |
| 19 #include "base/supports_user_data.h" | 19 #include "base/supports_user_data.h" |
| 20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 21 #include "content/public/browser/zoom_level_delegate.h" | |
| 22 #include "content/public/common/push_event_payload.h" | 21 #include "content/public/common/push_event_payload.h" |
| 23 #include "content/public/common/push_messaging_status.h" | 22 #include "content/public/common/push_messaging_status.h" |
| 24 #include "content/public/common/service_info.h" | 23 #include "content/public/common/service_info.h" |
| 25 #include "net/url_request/url_request_interceptor.h" | 24 #include "net/url_request/url_request_interceptor.h" |
| 26 #include "net/url_request/url_request_job_factory.h" | 25 #include "net/url_request/url_request_job_factory.h" |
| 27 | 26 |
| 27 #if !defined(OS_ANDROID) |
| 28 #include "content/public/browser/zoom_level_delegate.h" |
| 29 #endif |
| 30 |
| 28 class GURL; | 31 class GURL; |
| 29 | 32 |
| 30 namespace base { | 33 namespace base { |
| 31 class FilePath; | 34 class FilePath; |
| 32 class Time; | 35 class Time; |
| 33 } | 36 } |
| 34 | 37 |
| 35 namespace service_manager { | 38 namespace service_manager { |
| 36 class Connector; | 39 class Connector; |
| 37 } | 40 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 187 |
| 185 ~BrowserContext() override; | 188 ~BrowserContext() override; |
| 186 | 189 |
| 187 // Shuts down the storage partitions associated to this browser context. | 190 // Shuts down the storage partitions associated to this browser context. |
| 188 // This must be called before the browser context is actually destroyed | 191 // This must be called before the browser context is actually destroyed |
| 189 // and before a clean-up task for its corresponding IO thread residents (e.g. | 192 // and before a clean-up task for its corresponding IO thread residents (e.g. |
| 190 // ResourceContext) is posted, so that the classes that hung on | 193 // ResourceContext) is posted, so that the classes that hung on |
| 191 // StoragePartition can have time to do necessary cleanups on IO thread. | 194 // StoragePartition can have time to do necessary cleanups on IO thread. |
| 192 void ShutdownStoragePartitions(); | 195 void ShutdownStoragePartitions(); |
| 193 | 196 |
| 197 #if !defined(OS_ANDROID) |
| 194 // Creates a delegate to initialize a HostZoomMap and persist its information. | 198 // Creates a delegate to initialize a HostZoomMap and persist its information. |
| 195 // This is called during creation of each StoragePartition. | 199 // This is called during creation of each StoragePartition. |
| 196 virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 200 virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
| 197 const base::FilePath& partition_path) = 0; | 201 const base::FilePath& partition_path) = 0; |
| 202 #endif |
| 198 | 203 |
| 199 // Returns the path of the directory where this context's data is stored. | 204 // Returns the path of the directory where this context's data is stored. |
| 200 virtual base::FilePath GetPath() const = 0; | 205 virtual base::FilePath GetPath() const = 0; |
| 201 | 206 |
| 202 // Return whether this context is incognito. Default is false. | 207 // Return whether this context is incognito. Default is false. |
| 203 virtual bool IsOffTheRecord() const = 0; | 208 virtual bool IsOffTheRecord() const = 0; |
| 204 | 209 |
| 205 // Returns the resource context. | 210 // Returns the resource context. |
| 206 virtual ResourceContext* GetResourceContext() = 0; | 211 virtual ResourceContext* GetResourceContext() = 0; |
| 207 | 212 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // 2) The embedder saves its salt across restarts. | 281 // 2) The embedder saves its salt across restarts. |
| 277 static std::string CreateRandomMediaDeviceIDSalt(); | 282 static std::string CreateRandomMediaDeviceIDSalt(); |
| 278 | 283 |
| 279 private: | 284 private: |
| 280 const std::string media_device_id_salt_; | 285 const std::string media_device_id_salt_; |
| 281 }; | 286 }; |
| 282 | 287 |
| 283 } // namespace content | 288 } // namespace content |
| 284 | 289 |
| 285 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 290 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |