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" | |
13 #include "android_webview/browser/aw_ssl_host_state_delegate.h" | 12 #include "android_webview/browser/aw_ssl_host_state_delegate.h" |
14 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
15 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
16 #include "base/macros.h" | 15 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
19 #include "components/visitedlink/browser/visitedlink_delegate.h" | 18 #include "components/visitedlink/browser/visitedlink_delegate.h" |
20 #include "content/public/browser/browser_context.h" | 19 #include "content/public/browser/browser_context.h" |
21 #include "content/public/browser/content_browser_client.h" | 20 #include "content/public/browser/content_browser_client.h" |
22 #include "net/url_request/url_request_job_factory.h" | 21 #include "net/url_request/url_request_job_factory.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 static AwBrowserContext* GetDefault(); | 77 static AwBrowserContext* GetDefault(); |
79 | 78 |
80 // Convenience method to returns the AwBrowserContext corresponding to the | 79 // Convenience method to returns the AwBrowserContext corresponding to the |
81 // given WebContents. | 80 // given WebContents. |
82 static AwBrowserContext* FromWebContents( | 81 static AwBrowserContext* FromWebContents( |
83 content::WebContents* web_contents); | 82 content::WebContents* web_contents); |
84 | 83 |
85 static void SetDataReductionProxyEnabled(bool enabled); | 84 static void SetDataReductionProxyEnabled(bool enabled); |
86 static void SetLegacyCacheRemovalDelayForTest(int delay_ms); | 85 static void SetLegacyCacheRemovalDelayForTest(int delay_ms); |
87 | 86 |
88 // These map to BrowserMainParts::Pre/PostMainMessageLoopRun. | 87 // Maps to BrowserMainParts::PreMainMessageLoopRun. |
89 void PreMainMessageLoopRun(); | 88 void PreMainMessageLoopRun(); |
90 void PostMainMessageLoopRun(); | |
91 | 89 |
92 // These methods map to Add methods in visitedlink::VisitedLinkMaster. | 90 // These methods map to Add methods in visitedlink::VisitedLinkMaster. |
93 void AddVisitedURLs(const std::vector<GURL>& urls); | 91 void AddVisitedURLs(const std::vector<GURL>& urls); |
94 | 92 |
95 net::URLRequestContextGetter* CreateRequestContext( | 93 net::URLRequestContextGetter* CreateRequestContext( |
96 content::ProtocolHandlerMap* protocol_handlers, | 94 content::ProtocolHandlerMap* protocol_handlers, |
97 content::URLRequestInterceptorScopedVector request_interceptors); | 95 content::URLRequestInterceptorScopedVector request_interceptors); |
98 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 96 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
99 const base::FilePath& partition_path, | 97 const base::FilePath& partition_path, |
100 bool in_memory, | 98 bool in_memory, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 scoped_ptr<data_reduction_proxy::DataReductionProxyService> | 172 scoped_ptr<data_reduction_proxy::DataReductionProxyService> |
175 data_reduction_proxy_service_; | 173 data_reduction_proxy_service_; |
176 scoped_ptr<content::PermissionManager> permission_manager_; | 174 scoped_ptr<content::PermissionManager> permission_manager_; |
177 | 175 |
178 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 176 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
179 }; | 177 }; |
180 | 178 |
181 } // namespace android_webview | 179 } // namespace android_webview |
182 | 180 |
183 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 181 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |