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 "content/public/browser/geolocation_permission_context.h" | |
20 #include "net/url_request/url_request_job_factory.h" | 19 #include "net/url_request/url_request_job_factory.h" |
21 | 20 |
22 class GURL; | 21 class GURL; |
23 class PrefService; | 22 class PrefService; |
24 | 23 |
25 namespace content { | 24 namespace content { |
26 class ResourceContext; | 25 class ResourceContext; |
27 class WebContents; | 26 class WebContents; |
28 } | 27 } |
29 | 28 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 int render_view_id, | 117 int render_view_id, |
119 const GURL& origin, | 118 const GURL& origin, |
120 const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE; | 119 const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE; |
121 virtual void CancelProtectedMediaIdentifierPermissionRequests( | 120 virtual void CancelProtectedMediaIdentifierPermissionRequests( |
122 int render_process_id, | 121 int render_process_id, |
123 int render_view_id, | 122 int render_view_id, |
124 const GURL& origin) OVERRIDE; | 123 const GURL& origin) OVERRIDE; |
125 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 124 virtual content::ResourceContext* GetResourceContext() OVERRIDE; |
126 virtual content::DownloadManagerDelegate* | 125 virtual content::DownloadManagerDelegate* |
127 GetDownloadManagerDelegate() OVERRIDE; | 126 GetDownloadManagerDelegate() OVERRIDE; |
128 virtual content::GeolocationPermissionContext* | |
129 GetGeolocationPermissionContext() OVERRIDE; | |
130 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; | 127 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; |
131 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 128 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
132 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; | 129 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; |
133 | 130 |
134 // visitedlink::VisitedLinkDelegate implementation. | 131 // visitedlink::VisitedLinkDelegate implementation. |
135 virtual void RebuildTable( | 132 virtual void RebuildTable( |
136 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; | 133 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; |
137 | 134 |
138 private: | 135 private: |
139 static bool data_reduction_proxy_enabled_; | 136 static bool data_reduction_proxy_enabled_; |
140 | 137 |
141 // The file path where data for this context is persisted. | 138 // The file path where data for this context is persisted. |
142 base::FilePath context_storage_path_; | 139 base::FilePath context_storage_path_; |
143 | 140 |
144 JniDependencyFactory* native_factory_; | 141 JniDependencyFactory* native_factory_; |
145 scoped_refptr<net::CookieStore> cookie_store_; | 142 scoped_refptr<net::CookieStore> cookie_store_; |
146 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 143 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
147 scoped_refptr<content::GeolocationPermissionContext> | |
148 geolocation_permission_context_; | |
149 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 144 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
150 scoped_ptr<AwFormDatabaseService> form_database_service_; | 145 scoped_ptr<AwFormDatabaseService> form_database_service_; |
151 | 146 |
152 AwDownloadManagerDelegate download_manager_delegate_; | 147 AwDownloadManagerDelegate download_manager_delegate_; |
153 | 148 |
154 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 149 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
155 scoped_ptr<content::ResourceContext> resource_context_; | 150 scoped_ptr<content::ResourceContext> resource_context_; |
156 | 151 |
157 scoped_ptr<PrefService> user_pref_service_; | 152 scoped_ptr<PrefService> user_pref_service_; |
158 | 153 |
159 scoped_ptr<DataReductionProxySettings> data_reduction_proxy_settings_; | 154 scoped_ptr<DataReductionProxySettings> data_reduction_proxy_settings_; |
160 | 155 |
161 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 156 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
162 }; | 157 }; |
163 | 158 |
164 } // namespace android_webview | 159 } // namespace android_webview |
165 | 160 |
166 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 161 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |