Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 831523004: Enable posting a message from JS to Android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix component builds Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "android_webview/browser/aw_form_database_service.h" 7 #include "android_webview/browser/aw_form_database_service.h"
8 #include "android_webview/browser/aw_pref_store.h" 8 #include "android_webview/browser/aw_pref_store.h"
9 #include "android_webview/browser/aw_quota_manager_bridge.h" 9 #include "android_webview/browser/aw_quota_manager_bridge.h"
10 #include "android_webview/browser/aw_resource_context.h" 10 #include "android_webview/browser/aw_resource_context.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 data_reduction_proxy::DataReductionProxyConfigurator* 231 data_reduction_proxy::DataReductionProxyConfigurator*
232 AwBrowserContext::GetDataReductionProxyConfigurator() { 232 AwBrowserContext::GetDataReductionProxyConfigurator() {
233 return data_reduction_proxy_configurator_.get(); 233 return data_reduction_proxy_configurator_.get();
234 } 234 }
235 235
236 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() { 236 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() {
237 return url_request_context_getter_.get(); 237 return url_request_context_getter_.get();
238 } 238 }
239 239
240 AwMessagePortService* AwBrowserContext::GetMessagePortService() {
241 if (!message_port_service_.get()) {
242 message_port_service_.reset(
243 native_factory_->CreateAwMessagePortService());
244 }
245 return message_port_service_.get();
246 }
247
240 // Create user pref service for autofill functionality. 248 // Create user pref service for autofill functionality.
241 void AwBrowserContext::CreateUserPrefServiceIfNecessary() { 249 void AwBrowserContext::CreateUserPrefServiceIfNecessary() {
242 if (user_pref_service_) 250 if (user_pref_service_)
243 return; 251 return;
244 252
245 PrefRegistrySimple* pref_registry = new PrefRegistrySimple(); 253 PrefRegistrySimple* pref_registry = new PrefRegistrySimple();
246 // We only use the autocomplete feature of the Autofill, which is 254 // We only use the autocomplete feature of the Autofill, which is
247 // controlled via the manager_delegate. We don't use the rest 255 // controlled via the manager_delegate. We don't use the rest
248 // of autofill, which is why it is hardcoded as disabled here. 256 // of autofill, which is why it is hardcoded as disabled here.
249 pref_registry->RegisterBooleanPref( 257 pref_registry->RegisterBooleanPref(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 data_reduction_proxy_statistics_ = 375 data_reduction_proxy_statistics_ =
368 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( 376 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>(
369 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( 377 new data_reduction_proxy::DataReductionProxyStatisticsPrefs(
370 user_pref_service_.get(), 378 user_pref_service_.get(),
371 base::MessageLoopProxy::current(), 379 base::MessageLoopProxy::current(),
372 commit_delay)); 380 commit_delay));
373 } 381 }
374 } 382 }
375 383
376 } // namespace android_webview 384 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698