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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 namespace visitedlink { | 41 namespace visitedlink { |
42 class VisitedLinkMaster; | 42 class VisitedLinkMaster; |
43 } | 43 } |
44 | 44 |
45 namespace android_webview { | 45 namespace android_webview { |
46 | 46 |
47 class AwFormDatabaseService; | 47 class AwFormDatabaseService; |
48 class AwQuotaManagerBridge; | 48 class AwQuotaManagerBridge; |
49 class AwURLRequestContextGetter; | 49 class AwURLRequestContextGetter; |
50 class JniDependencyFactory; | |
51 | 50 |
52 namespace prefs { | 51 namespace prefs { |
53 | 52 |
54 // Used for Kerberos authentication. | 53 // Used for Kerberos authentication. |
55 extern const char kAuthAndroidNegotiateAccountType[]; | 54 extern const char kAuthAndroidNegotiateAccountType[]; |
56 extern const char kAuthServerWhitelist[]; | 55 extern const char kAuthServerWhitelist[]; |
57 extern const char kWebRestrictionsAuthority[]; | 56 extern const char kWebRestrictionsAuthority[]; |
58 | 57 |
59 } // namespace prefs | 58 } // namespace prefs |
60 | 59 |
61 class AwBrowserContext : public content::BrowserContext, | 60 class AwBrowserContext : public content::BrowserContext, |
62 public visitedlink::VisitedLinkDelegate { | 61 public visitedlink::VisitedLinkDelegate { |
63 public: | 62 public: |
64 | 63 AwBrowserContext(const base::FilePath path); |
65 AwBrowserContext(const base::FilePath path, | |
66 JniDependencyFactory* native_factory); | |
67 ~AwBrowserContext() override; | 64 ~AwBrowserContext() override; |
68 | 65 |
69 // Currently only one instance per process is supported. | 66 // Currently only one instance per process is supported. |
70 static AwBrowserContext* GetDefault(); | 67 static AwBrowserContext* GetDefault(); |
71 | 68 |
72 // Convenience method to returns the AwBrowserContext corresponding to the | 69 // Convenience method to returns the AwBrowserContext corresponding to the |
73 // given WebContents. | 70 // given WebContents. |
74 static AwBrowserContext* FromWebContents( | 71 static AwBrowserContext* FromWebContents( |
75 content::WebContents* web_contents); | 72 content::WebContents* web_contents); |
76 | 73 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void OnWebRestrictionsAuthorityChanged(); | 123 void OnWebRestrictionsAuthorityChanged(); |
127 | 124 |
128 | 125 |
129 // Delay, in milliseconds, before removing the legacy cache dir. | 126 // Delay, in milliseconds, before removing the legacy cache dir. |
130 // This is non-const for testing purposes. | 127 // This is non-const for testing purposes. |
131 static int legacy_cache_removal_delay_ms_; | 128 static int legacy_cache_removal_delay_ms_; |
132 | 129 |
133 // The file path where data for this context is persisted. | 130 // The file path where data for this context is persisted. |
134 base::FilePath context_storage_path_; | 131 base::FilePath context_storage_path_; |
135 | 132 |
136 JniDependencyFactory* native_factory_; | |
137 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 133 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
138 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; | 134 scoped_refptr<AwQuotaManagerBridge> quota_manager_bridge_; |
139 std::unique_ptr<AwFormDatabaseService> form_database_service_; | 135 std::unique_ptr<AwFormDatabaseService> form_database_service_; |
140 | 136 |
141 AwDownloadManagerDelegate download_manager_delegate_; | 137 AwDownloadManagerDelegate download_manager_delegate_; |
142 | 138 |
143 std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | 139 std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; |
144 std::unique_ptr<content::ResourceContext> resource_context_; | 140 std::unique_ptr<content::ResourceContext> resource_context_; |
145 | 141 |
146 std::unique_ptr<PrefService> user_pref_service_; | 142 std::unique_ptr<PrefService> user_pref_service_; |
(...skipping 10 matching lines...) Expand all Loading... |
157 scoped_refptr<safe_browsing::RemoteSafeBrowsingDatabaseManager> | 153 scoped_refptr<safe_browsing::RemoteSafeBrowsingDatabaseManager> |
158 safe_browsing_db_manager_; | 154 safe_browsing_db_manager_; |
159 bool safe_browsing_db_manager_started_ = false; | 155 bool safe_browsing_db_manager_started_ = false; |
160 | 156 |
161 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 157 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
162 }; | 158 }; |
163 | 159 |
164 } // namespace android_webview | 160 } // namespace android_webview |
165 | 161 |
166 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 162 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |