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 "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "components/visitedlink/browser/visitedlink_delegate.h" | 16 #include "components/visitedlink/browser/visitedlink_delegate.h" |
17 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
18 #include "content/public/browser/content_browser_client.h" | 18 #include "content/public/browser/content_browser_client.h" |
19 #include "net/url_request/url_request_job_factory.h" | 19 #include "net/url_request/url_request_job_factory.h" |
20 | 20 |
21 class GURL; | 21 class GURL; |
22 class PrefService; | 22 class PrefService; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 class ResourceContext; | 25 class ResourceContext; |
26 class WebContents; | 26 class WebContents; |
27 } | 27 } |
28 | 28 |
29 namespace data_reduction_proxy { | 29 namespace data_reduction_proxy { |
30 class DataReductionProxyAuthRequestHandler; | |
31 class DataReductionProxySettings; | 30 class DataReductionProxySettings; |
32 } | 31 } |
33 | 32 |
34 namespace net { | 33 namespace net { |
35 class CookieStore; | 34 class CookieStore; |
36 } | 35 } |
37 | 36 |
38 namespace visitedlink { | 37 namespace visitedlink { |
39 class VisitedLinkMaster; | 38 class VisitedLinkMaster; |
40 } | 39 } |
41 | 40 |
42 using data_reduction_proxy::DataReductionProxyAuthRequestHandler; | |
43 using data_reduction_proxy::DataReductionProxySettings; | |
44 | |
45 namespace android_webview { | 41 namespace android_webview { |
46 | 42 |
47 class AwFormDatabaseService; | 43 class AwFormDatabaseService; |
48 class AwQuotaManagerBridge; | 44 class AwQuotaManagerBridge; |
49 class AwURLRequestContextGetter; | 45 class AwURLRequestContextGetter; |
50 class JniDependencyFactory; | 46 class JniDependencyFactory; |
51 | 47 |
52 class AwBrowserContext : public content::BrowserContext, | 48 class AwBrowserContext : public content::BrowserContext, |
53 public visitedlink::VisitedLinkDelegate { | 49 public visitedlink::VisitedLinkDelegate { |
54 public: | 50 public: |
(...skipping 24 matching lines...) Expand all Loading... |
79 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 75 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
80 const base::FilePath& partition_path, | 76 const base::FilePath& partition_path, |
81 bool in_memory, | 77 bool in_memory, |
82 content::ProtocolHandlerMap* protocol_handlers, | 78 content::ProtocolHandlerMap* protocol_handlers, |
83 content::URLRequestInterceptorScopedVector request_interceptors); | 79 content::URLRequestInterceptorScopedVector request_interceptors); |
84 | 80 |
85 AwQuotaManagerBridge* GetQuotaManagerBridge(); | 81 AwQuotaManagerBridge* GetQuotaManagerBridge(); |
86 | 82 |
87 AwFormDatabaseService* GetFormDatabaseService(); | 83 AwFormDatabaseService* GetFormDatabaseService(); |
88 | 84 |
89 DataReductionProxySettings* GetDataReductionProxySettings(); | 85 data_reduction_proxy::DataReductionProxySettings* |
90 | 86 GetDataReductionProxySettings(); |
91 DataReductionProxyAuthRequestHandler* | |
92 GetDataReductionProxyAuthRequestHandler(); | |
93 | 87 |
94 void CreateUserPrefServiceIfNecessary(); | 88 void CreateUserPrefServiceIfNecessary(); |
95 | 89 |
96 // content::BrowserContext implementation. | 90 // content::BrowserContext implementation. |
97 virtual base::FilePath GetPath() const OVERRIDE; | 91 virtual base::FilePath GetPath() const OVERRIDE; |
98 virtual bool IsOffTheRecord() const OVERRIDE; | 92 virtual bool IsOffTheRecord() const OVERRIDE; |
99 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 93 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
100 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 94 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
101 int renderer_child_id) OVERRIDE; | 95 int renderer_child_id) OVERRIDE; |
102 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; | 96 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; |
(...skipping 25 matching lines...) Expand all Loading... |
128 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 122 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
129 scoped_ptr<AwFormDatabaseService> form_database_service_; | 123 scoped_ptr<AwFormDatabaseService> form_database_service_; |
130 | 124 |
131 AwDownloadManagerDelegate download_manager_delegate_; | 125 AwDownloadManagerDelegate download_manager_delegate_; |
132 | 126 |
133 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 127 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
134 scoped_ptr<content::ResourceContext> resource_context_; | 128 scoped_ptr<content::ResourceContext> resource_context_; |
135 | 129 |
136 scoped_ptr<PrefService> user_pref_service_; | 130 scoped_ptr<PrefService> user_pref_service_; |
137 | 131 |
138 scoped_ptr<DataReductionProxySettings> data_reduction_proxy_settings_; | 132 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> |
139 scoped_ptr<DataReductionProxyAuthRequestHandler> | 133 data_reduction_proxy_settings_; |
140 data_reduction_proxy_auth_request_handler_; | |
141 | 134 |
142 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 135 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
143 }; | 136 }; |
144 | 137 |
145 } // namespace android_webview | 138 } // namespace android_webview |
146 | 139 |
147 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 140 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |