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" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class WebContents; | 27 class WebContents; |
28 } | 28 } |
29 | 29 |
30 namespace data_reduction_proxy { | 30 namespace data_reduction_proxy { |
31 class DataReductionProxyConfigurator; | 31 class DataReductionProxyConfigurator; |
32 class DataReductionProxySettings; | 32 class DataReductionProxySettings; |
33 } | 33 } |
34 | 34 |
35 namespace net { | 35 namespace net { |
36 class CookieStore; | 36 class CookieStore; |
| 37 class NetLog; |
37 } | 38 } |
38 | 39 |
39 namespace visitedlink { | 40 namespace visitedlink { |
40 class VisitedLinkMaster; | 41 class VisitedLinkMaster; |
41 } | 42 } |
42 | 43 |
43 namespace android_webview { | 44 namespace android_webview { |
44 | 45 |
45 class AwFormDatabaseService; | 46 class AwFormDatabaseService; |
46 class AwQuotaManagerBridge; | 47 class AwQuotaManagerBridge; |
47 class AwURLRequestContextGetter; | 48 class AwURLRequestContextGetter; |
48 class JniDependencyFactory; | 49 class JniDependencyFactory; |
49 | 50 |
50 class AwBrowserContext : public content::BrowserContext, | 51 class AwBrowserContext : public content::BrowserContext, |
51 public visitedlink::VisitedLinkDelegate { | 52 public visitedlink::VisitedLinkDelegate { |
52 public: | 53 public: |
53 | 54 |
54 AwBrowserContext(const base::FilePath path, | 55 AwBrowserContext(const base::FilePath path, |
55 JniDependencyFactory* native_factory); | 56 JniDependencyFactory* native_factory, |
| 57 net::NetLog* net_log); |
56 virtual ~AwBrowserContext(); | 58 virtual ~AwBrowserContext(); |
57 | 59 |
58 // Currently only one instance per process is supported. | 60 // Currently only one instance per process is supported. |
59 static AwBrowserContext* GetDefault(); | 61 static AwBrowserContext* GetDefault(); |
60 | 62 |
61 // Convenience method to returns the AwBrowserContext corresponding to the | 63 // Convenience method to returns the AwBrowserContext corresponding to the |
62 // given WebContents. | 64 // given WebContents. |
63 static AwBrowserContext* FromWebContents( | 65 static AwBrowserContext* FromWebContents( |
64 content::WebContents* web_contents); | 66 content::WebContents* web_contents); |
65 | 67 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 virtual void RebuildTable( | 115 virtual void RebuildTable( |
114 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; | 116 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; |
115 | 117 |
116 private: | 118 private: |
117 static bool data_reduction_proxy_enabled_; | 119 static bool data_reduction_proxy_enabled_; |
118 | 120 |
119 // The file path where data for this context is persisted. | 121 // The file path where data for this context is persisted. |
120 base::FilePath context_storage_path_; | 122 base::FilePath context_storage_path_; |
121 | 123 |
122 JniDependencyFactory* native_factory_; | 124 JniDependencyFactory* native_factory_; |
| 125 net::NetLog* net_log_; |
123 scoped_refptr<net::CookieStore> cookie_store_; | 126 scoped_refptr<net::CookieStore> cookie_store_; |
124 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 127 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
125 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 128 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
126 scoped_ptr<AwFormDatabaseService> form_database_service_; | 129 scoped_ptr<AwFormDatabaseService> form_database_service_; |
127 | 130 |
128 AwDownloadManagerDelegate download_manager_delegate_; | 131 AwDownloadManagerDelegate download_manager_delegate_; |
129 | 132 |
130 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 133 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
131 scoped_ptr<content::ResourceContext> resource_context_; | 134 scoped_ptr<content::ResourceContext> resource_context_; |
132 | 135 |
133 scoped_ptr<PrefService> user_pref_service_; | 136 scoped_ptr<PrefService> user_pref_service_; |
134 | 137 |
135 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> | 138 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> |
136 data_reduction_proxy_configurator_; | 139 data_reduction_proxy_configurator_; |
137 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> | 140 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> |
138 data_reduction_proxy_settings_; | 141 data_reduction_proxy_settings_; |
139 | 142 |
140 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 143 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
141 }; | 144 }; |
142 | 145 |
143 } // namespace android_webview | 146 } // namespace android_webview |
144 | 147 |
145 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 148 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |