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

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: minor fixes 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 DataReductionProxyEventStore* 234 DataReductionProxyEventStore*
235 AwBrowserContext::GetDataReductionProxyEventStore() { 235 AwBrowserContext::GetDataReductionProxyEventStore() {
236 return data_reduction_proxy_event_store_.get(); 236 return data_reduction_proxy_event_store_.get();
237 } 237 }
238 238
239 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() { 239 AwURLRequestContextGetter* AwBrowserContext::GetAwURLRequestContext() {
240 return url_request_context_getter_.get(); 240 return url_request_context_getter_.get();
241 } 241 }
242 242
243 AwMessagePortService* AwBrowserContext::GetMessagePortService() {
244 if (!message_port_service_.get()) {
245 message_port_service_.reset(
246 native_factory_->CreateAwMessagePortService());
247 }
248 return message_port_service_.get();
249 }
250
243 // Create user pref service for autofill functionality. 251 // Create user pref service for autofill functionality.
244 void AwBrowserContext::CreateUserPrefServiceIfNecessary() { 252 void AwBrowserContext::CreateUserPrefServiceIfNecessary() {
245 if (user_pref_service_) 253 if (user_pref_service_)
246 return; 254 return;
247 255
248 PrefRegistrySimple* pref_registry = new PrefRegistrySimple(); 256 PrefRegistrySimple* pref_registry = new PrefRegistrySimple();
249 // We only use the autocomplete feature of the Autofill, which is 257 // We only use the autocomplete feature of the Autofill, which is
250 // controlled via the manager_delegate. We don't use the rest 258 // controlled via the manager_delegate. We don't use the rest
251 // of autofill, which is why it is hardcoded as disabled here. 259 // of autofill, which is why it is hardcoded as disabled here.
252 pref_registry->RegisterBooleanPref( 260 pref_registry->RegisterBooleanPref(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 data_reduction_proxy_statistics_ = 378 data_reduction_proxy_statistics_ =
371 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( 379 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>(
372 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( 380 new data_reduction_proxy::DataReductionProxyStatisticsPrefs(
373 user_pref_service_.get(), 381 user_pref_service_.get(),
374 base::MessageLoopProxy::current(), 382 base::MessageLoopProxy::current(),
375 commit_delay)); 383 commit_delay));
376 } 384 }
377 } 385 }
378 386
379 } // namespace android_webview 387 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698