| 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 <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "android_webview/browser/aw_download_manager_delegate.h" | 11 #include "android_webview/browser/aw_download_manager_delegate.h" |
| 12 #include "android_webview/browser/aw_message_port_service.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 "components/prefs/pref_change_registrar.h" | 17 #include "components/prefs/pref_change_registrar.h" |
| 19 #include "components/visitedlink/browser/visitedlink_delegate.h" | 18 #include "components/visitedlink/browser/visitedlink_delegate.h" |
| 20 #include "components/web_restrictions/browser/web_restrictions_client.h" | 19 #include "components/web_restrictions/browser/web_restrictions_client.h" |
| 21 #include "content/public/browser/browser_context.h" | 20 #include "content/public/browser/browser_context.h" |
| 22 #include "content/public/browser/content_browser_client.h" | 21 #include "content/public/browser/content_browser_client.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 76 |
| 78 // Maps to BrowserMainParts::PreMainMessageLoopRun. | 77 // Maps to BrowserMainParts::PreMainMessageLoopRun. |
| 79 void PreMainMessageLoopRun(); | 78 void PreMainMessageLoopRun(); |
| 80 | 79 |
| 81 // These methods map to Add methods in visitedlink::VisitedLinkMaster. | 80 // These methods map to Add methods in visitedlink::VisitedLinkMaster. |
| 82 void AddVisitedURLs(const std::vector<GURL>& urls); | 81 void AddVisitedURLs(const std::vector<GURL>& urls); |
| 83 | 82 |
| 84 AwQuotaManagerBridge* GetQuotaManagerBridge(); | 83 AwQuotaManagerBridge* GetQuotaManagerBridge(); |
| 85 AwFormDatabaseService* GetFormDatabaseService(); | 84 AwFormDatabaseService* GetFormDatabaseService(); |
| 86 AwURLRequestContextGetter* GetAwURLRequestContext(); | 85 AwURLRequestContextGetter* GetAwURLRequestContext(); |
| 87 AwMessagePortService* GetMessagePortService(); | |
| 88 | 86 |
| 89 policy::URLBlacklistManager* GetURLBlacklistManager(); | 87 policy::URLBlacklistManager* GetURLBlacklistManager(); |
| 90 web_restrictions::WebRestrictionsClient* GetWebRestrictionProvider(); | 88 web_restrictions::WebRestrictionsClient* GetWebRestrictionProvider(); |
| 91 | 89 |
| 92 // content::BrowserContext implementation. | 90 // content::BrowserContext implementation. |
| 93 std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( | 91 std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( |
| 94 const base::FilePath& partition_path) override; | 92 const base::FilePath& partition_path) override; |
| 95 base::FilePath GetPath() const override; | 93 base::FilePath GetPath() const override; |
| 96 bool IsOffTheRecord() const override; | 94 bool IsOffTheRecord() const override; |
| 97 content::ResourceContext* GetResourceContext() override; | 95 content::ResourceContext* GetResourceContext() override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 127 // This is non-const for testing purposes. | 125 // This is non-const for testing purposes. |
| 128 static int legacy_cache_removal_delay_ms_; | 126 static int legacy_cache_removal_delay_ms_; |
| 129 | 127 |
| 130 // The file path where data for this context is persisted. | 128 // The file path where data for this context is persisted. |
| 131 base::FilePath context_storage_path_; | 129 base::FilePath context_storage_path_; |
| 132 | 130 |
| 133 JniDependencyFactory* native_factory_; | 131 JniDependencyFactory* native_factory_; |
| 134 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 132 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
| 135 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 133 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
| 136 std::unique_ptr<AwFormDatabaseService> form_database_service_; | 134 std::unique_ptr<AwFormDatabaseService> form_database_service_; |
| 137 std::unique_ptr<AwMessagePortService> message_port_service_; | |
| 138 | 135 |
| 139 AwDownloadManagerDelegate download_manager_delegate_; | 136 AwDownloadManagerDelegate download_manager_delegate_; |
| 140 | 137 |
| 141 std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 138 std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
| 142 std::unique_ptr<content::ResourceContext> resource_context_; | 139 std::unique_ptr<content::ResourceContext> resource_context_; |
| 143 | 140 |
| 144 std::unique_ptr<PrefService> user_pref_service_; | 141 std::unique_ptr<PrefService> user_pref_service_; |
| 145 std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; | 142 std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; |
| 146 std::unique_ptr<policy::URLBlacklistManager> blacklist_manager_; | 143 std::unique_ptr<policy::URLBlacklistManager> blacklist_manager_; |
| 147 | 144 |
| 148 std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; | 145 std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; |
| 149 std::unique_ptr<content::PermissionManager> permission_manager_; | 146 std::unique_ptr<content::PermissionManager> permission_manager_; |
| 150 std::unique_ptr<web_restrictions::WebRestrictionsClient> | 147 std::unique_ptr<web_restrictions::WebRestrictionsClient> |
| 151 web_restriction_provider_; | 148 web_restriction_provider_; |
| 152 PrefChangeRegistrar pref_change_registrar_; | 149 PrefChangeRegistrar pref_change_registrar_; |
| 153 | 150 |
| 154 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 151 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
| 155 }; | 152 }; |
| 156 | 153 |
| 157 } // namespace android_webview | 154 } // namespace android_webview |
| 158 | 155 |
| 159 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 156 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| OLD | NEW |