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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "android_webview/browser/aw_download_manager_delegate.h" | 10 #include "android_webview/browser/aw_download_manager_delegate.h" |
11 #include "android_webview/browser/aw_message_port_service.h" | 11 #include "android_webview/browser/aw_message_port_service.h" |
| 12 #include "android_webview/browser/aw_metrics_service_client.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 "base/memory/scoped_ptr.h" |
18 #include "components/visitedlink/browser/visitedlink_delegate.h" | 19 #include "components/visitedlink/browser/visitedlink_delegate.h" |
19 #include "content/public/browser/browser_context.h" | 20 #include "content/public/browser/browser_context.h" |
20 #include "content/public/browser/content_browser_client.h" | 21 #include "content/public/browser/content_browser_client.h" |
21 #include "net/url_request/url_request_job_factory.h" | 22 #include "net/url_request/url_request_job_factory.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 static AwBrowserContext* GetDefault(); | 78 static AwBrowserContext* GetDefault(); |
78 | 79 |
79 // Convenience method to returns the AwBrowserContext corresponding to the | 80 // Convenience method to returns the AwBrowserContext corresponding to the |
80 // given WebContents. | 81 // given WebContents. |
81 static AwBrowserContext* FromWebContents( | 82 static AwBrowserContext* FromWebContents( |
82 content::WebContents* web_contents); | 83 content::WebContents* web_contents); |
83 | 84 |
84 static void SetDataReductionProxyEnabled(bool enabled); | 85 static void SetDataReductionProxyEnabled(bool enabled); |
85 static void SetLegacyCacheRemovalDelayForTest(int delay_ms); | 86 static void SetLegacyCacheRemovalDelayForTest(int delay_ms); |
86 | 87 |
87 // Maps to BrowserMainParts::PreMainMessageLoopRun. | 88 // These map to BrowserMainParts::Pre/PostMainMessageLoopRun. |
88 void PreMainMessageLoopRun(); | 89 void PreMainMessageLoopRun(); |
| 90 void PostMainMessageLoopRun(); |
89 | 91 |
90 // These methods map to Add methods in visitedlink::VisitedLinkMaster. | 92 // These methods map to Add methods in visitedlink::VisitedLinkMaster. |
91 void AddVisitedURLs(const std::vector<GURL>& urls); | 93 void AddVisitedURLs(const std::vector<GURL>& urls); |
92 | 94 |
93 net::URLRequestContextGetter* CreateRequestContext( | 95 net::URLRequestContextGetter* CreateRequestContext( |
94 content::ProtocolHandlerMap* protocol_handlers, | 96 content::ProtocolHandlerMap* protocol_handlers, |
95 content::URLRequestInterceptorScopedVector request_interceptors); | 97 content::URLRequestInterceptorScopedVector request_interceptors); |
96 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 98 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
97 const base::FilePath& partition_path, | 99 const base::FilePath& partition_path, |
98 bool in_memory, | 100 bool in_memory, |
99 content::ProtocolHandlerMap* protocol_handlers, | 101 content::ProtocolHandlerMap* protocol_handlers, |
100 content::URLRequestInterceptorScopedVector request_interceptors); | 102 content::URLRequestInterceptorScopedVector request_interceptors); |
101 | 103 |
102 AwQuotaManagerBridge* GetQuotaManagerBridge(); | 104 AwQuotaManagerBridge* GetQuotaManagerBridge(); |
103 | |
104 AwFormDatabaseService* GetFormDatabaseService(); | 105 AwFormDatabaseService* GetFormDatabaseService(); |
105 | |
106 data_reduction_proxy::DataReductionProxySettings* | 106 data_reduction_proxy::DataReductionProxySettings* |
107 GetDataReductionProxySettings(); | 107 GetDataReductionProxySettings(); |
108 | |
109 data_reduction_proxy::DataReductionProxyIOData* | 108 data_reduction_proxy::DataReductionProxyIOData* |
110 GetDataReductionProxyIOData(); | 109 GetDataReductionProxyIOData(); |
111 | |
112 AwURLRequestContextGetter* GetAwURLRequestContext(); | 110 AwURLRequestContextGetter* GetAwURLRequestContext(); |
113 | |
114 AwMessagePortService* GetMessagePortService(); | 111 AwMessagePortService* GetMessagePortService(); |
115 | 112 |
116 policy::URLBlacklistManager* GetURLBlacklistManager(); | 113 policy::URLBlacklistManager* GetURLBlacklistManager(); |
117 | 114 |
118 // content::BrowserContext implementation. | 115 // content::BrowserContext implementation. |
119 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( | 116 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( |
120 const base::FilePath& partition_path) override; | 117 const base::FilePath& partition_path) override; |
121 base::FilePath GetPath() const override; | 118 base::FilePath GetPath() const override; |
122 bool IsOffTheRecord() const override; | 119 bool IsOffTheRecord() const override; |
123 net::URLRequestContextGetter* GetRequestContext() override; | 120 net::URLRequestContextGetter* GetRequestContext() override; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 scoped_ptr<data_reduction_proxy::DataReductionProxyService> | 174 scoped_ptr<data_reduction_proxy::DataReductionProxyService> |
178 data_reduction_proxy_service_; | 175 data_reduction_proxy_service_; |
179 scoped_ptr<content::PermissionManager> permission_manager_; | 176 scoped_ptr<content::PermissionManager> permission_manager_; |
180 | 177 |
181 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 178 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
182 }; | 179 }; |
183 | 180 |
184 } // namespace android_webview | 181 } // namespace android_webview |
185 | 182 |
186 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 183 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |