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 ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "android_webview/browser/aw_download_manager_delegate.h" | 11 #include "android_webview/browser/aw_download_manager_delegate.h" |
11 #include "android_webview/browser/aw_message_port_service.h" | 12 #include "android_webview/browser/aw_message_port_service.h" |
12 #include "android_webview/browser/aw_ssl_host_state_delegate.h" | 13 #include "android_webview/browser/aw_ssl_host_state_delegate.h" |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "components/visitedlink/browser/visitedlink_delegate.h" | 18 #include "components/visitedlink/browser/visitedlink_delegate.h" |
19 #include "content/public/browser/browser_context.h" | 19 #include "content/public/browser/browser_context.h" |
20 #include "content/public/browser/content_browser_client.h" | 20 #include "content/public/browser/content_browser_client.h" |
21 #include "net/url_request/url_request_job_factory.h" | 21 #include "net/url_request/url_request_job_factory.h" |
22 | 22 |
23 class GURL; | 23 class GURL; |
24 class PrefService; | 24 class PrefService; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class PermissionManager; | 27 class PermissionManager; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 data_reduction_proxy::DataReductionProxySettings* | 100 data_reduction_proxy::DataReductionProxySettings* |
101 GetDataReductionProxySettings(); | 101 GetDataReductionProxySettings(); |
102 data_reduction_proxy::DataReductionProxyIOData* | 102 data_reduction_proxy::DataReductionProxyIOData* |
103 GetDataReductionProxyIOData(); | 103 GetDataReductionProxyIOData(); |
104 AwURLRequestContextGetter* GetAwURLRequestContext(); | 104 AwURLRequestContextGetter* GetAwURLRequestContext(); |
105 AwMessagePortService* GetMessagePortService(); | 105 AwMessagePortService* GetMessagePortService(); |
106 | 106 |
107 policy::URLBlacklistManager* GetURLBlacklistManager(); | 107 policy::URLBlacklistManager* GetURLBlacklistManager(); |
108 | 108 |
109 // content::BrowserContext implementation. | 109 // content::BrowserContext implementation. |
110 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( | 110 std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( |
111 const base::FilePath& partition_path) override; | 111 const base::FilePath& partition_path) override; |
112 base::FilePath GetPath() const override; | 112 base::FilePath GetPath() const override; |
113 bool IsOffTheRecord() const override; | 113 bool IsOffTheRecord() const override; |
114 net::URLRequestContextGetter* GetRequestContext() override; | 114 net::URLRequestContextGetter* GetRequestContext() override; |
115 net::URLRequestContextGetter* GetMediaRequestContext() override; | 115 net::URLRequestContextGetter* GetMediaRequestContext() override; |
116 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 116 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
117 int renderer_child_id) override; | 117 int renderer_child_id) override; |
118 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( | 118 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( |
119 const base::FilePath& partition_path, | 119 const base::FilePath& partition_path, |
120 bool in_memory) override; | 120 bool in_memory) override; |
(...skipping 17 matching lines...) Expand all Loading... |
138 // Delay, in milliseconds, before removing the legacy cache dir. | 138 // Delay, in milliseconds, before removing the legacy cache dir. |
139 // This is non-const for testing purposes. | 139 // This is non-const for testing purposes. |
140 static int legacy_cache_removal_delay_ms_; | 140 static int legacy_cache_removal_delay_ms_; |
141 | 141 |
142 // The file path where data for this context is persisted. | 142 // The file path where data for this context is persisted. |
143 base::FilePath context_storage_path_; | 143 base::FilePath context_storage_path_; |
144 | 144 |
145 JniDependencyFactory* native_factory_; | 145 JniDependencyFactory* native_factory_; |
146 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 146 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
147 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 147 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
148 scoped_ptr<AwFormDatabaseService> form_database_service_; | 148 std::unique_ptr<AwFormDatabaseService> form_database_service_; |
149 scoped_ptr<AwMessagePortService> message_port_service_; | 149 std::unique_ptr<AwMessagePortService> message_port_service_; |
150 | 150 |
151 AwDownloadManagerDelegate download_manager_delegate_; | 151 AwDownloadManagerDelegate download_manager_delegate_; |
152 | 152 |
153 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 153 std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
154 scoped_ptr<content::ResourceContext> resource_context_; | 154 std::unique_ptr<content::ResourceContext> resource_context_; |
155 | 155 |
156 scoped_ptr<PrefService> user_pref_service_; | 156 std::unique_ptr<PrefService> user_pref_service_; |
157 scoped_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; | 157 std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; |
158 scoped_ptr<policy::URLBlacklistManager> blacklist_manager_; | 158 std::unique_ptr<policy::URLBlacklistManager> blacklist_manager_; |
159 | 159 |
160 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> | 160 std::unique_ptr<data_reduction_proxy::DataReductionProxySettings> |
161 data_reduction_proxy_settings_; | 161 data_reduction_proxy_settings_; |
162 scoped_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; | 162 std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; |
163 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 163 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> |
164 data_reduction_proxy_io_data_; | 164 data_reduction_proxy_io_data_; |
165 scoped_ptr<data_reduction_proxy::DataReductionProxyService> | 165 std::unique_ptr<data_reduction_proxy::DataReductionProxyService> |
166 data_reduction_proxy_service_; | 166 data_reduction_proxy_service_; |
167 scoped_ptr<content::PermissionManager> permission_manager_; | 167 std::unique_ptr<content::PermissionManager> permission_manager_; |
168 | 168 |
169 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 169 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
170 }; | 170 }; |
171 | 171 |
172 } // namespace android_webview | 172 } // namespace android_webview |
173 | 173 |
174 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 174 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |