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 #include "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_policy_connector.h" | 9 #include "android_webview/browser/aw_browser_policy_connector.h" |
10 #include "android_webview/browser/aw_form_database_service.h" | 10 #include "android_webview/browser/aw_form_database_service.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 | 232 |
233 AwFormDatabaseService* AwBrowserContext::GetFormDatabaseService() { | 233 AwFormDatabaseService* AwBrowserContext::GetFormDatabaseService() { |
234 return form_database_service_.get(); | 234 return form_database_service_.get(); |
235 } | 235 } |
236 | 236 |
237 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() { | 237 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() { |
238 return url_request_context_getter_.get(); | 238 return url_request_context_getter_.get(); |
239 } | 239 } |
240 | 240 |
241 AwMessagePortService* AwBrowserContext::GetMessagePortService() { | |
242 if (!message_port_service_.get()) { | |
243 message_port_service_.reset( | |
244 native_factory_->CreateAwMessagePortService()); | |
245 } | |
246 return message_port_service_.get(); | |
247 } | |
248 | |
249 // Create user pref service | 241 // Create user pref service |
250 void AwBrowserContext::InitUserPrefService() { | 242 void AwBrowserContext::InitUserPrefService() { |
251 user_prefs::PrefRegistrySyncable* pref_registry = | 243 user_prefs::PrefRegistrySyncable* pref_registry = |
252 new user_prefs::PrefRegistrySyncable(); | 244 new user_prefs::PrefRegistrySyncable(); |
253 // We only use the autocomplete feature of Autofill, which is controlled via | 245 // We only use the autocomplete feature of Autofill, which is controlled via |
254 // the manager_delegate. We don't use the rest of Autofill, which is why it is | 246 // the manager_delegate. We don't use the rest of Autofill, which is why it is |
255 // hardcoded as disabled here. | 247 // hardcoded as disabled here. |
256 pref_registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, false); | 248 pref_registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, false); |
257 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); | 249 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); |
258 | 250 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 382 |
391 void AwBrowserContext::RebuildTable( | 383 void AwBrowserContext::RebuildTable( |
392 const scoped_refptr<URLEnumerator>& enumerator) { | 384 const scoped_refptr<URLEnumerator>& enumerator) { |
393 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 385 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
394 // can change in the lifetime of this WebView and may not yet be set here. | 386 // can change in the lifetime of this WebView and may not yet be set here. |
395 // Therefore this initialization path is not used. | 387 // Therefore this initialization path is not used. |
396 enumerator->OnComplete(true); | 388 enumerator->OnComplete(true); |
397 } | 389 } |
398 | 390 |
399 } // namespace android_webview | 391 } // namespace android_webview |
OLD | NEW |