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

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java

Issue 2828353002: Android: Remove GetApplicationContext part 3 (Closed)
Patch Set: Fix android webview tests Created 3 years, 8 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/ContentViewMiscTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 private void initPlatSupportLibrary() { 323 private void initPlatSupportLibrary() {
324 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction ()); 324 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction ());
325 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable ()); 325 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable ());
326 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable ()); 326 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable ());
327 } 327 }
328 328
329 private void doNetworkInitializations(Context applicationContext) { 329 private void doNetworkInitializations(Context applicationContext) {
330 if (applicationContext.checkPermission(Manifest.permission.ACCESS_NETWOR K_STATE, 330 if (applicationContext.checkPermission(Manifest.permission.ACCESS_NETWOR K_STATE,
331 Process.myPid(), Process.myUid()) == PackageManager.PERMISSION_G RANTED) { 331 Process.myPid(), Process.myUid()) == PackageManager.PERMISSION_G RANTED) {
332 NetworkChangeNotifier.init(applicationContext); 332 NetworkChangeNotifier.init();
333 NetworkChangeNotifier.setAutoDetectConnectivityState( 333 NetworkChangeNotifier.setAutoDetectConnectivityState(
334 new AwNetworkChangeNotifierRegistrationPolicy()); 334 new AwNetworkChangeNotifierRegistrationPolicy());
335 } 335 }
336 336
337 AwContentsStatics.setCheckClearTextPermitted(BuildInfo.targetsAtLeastO(a pplicationContext)); 337 AwContentsStatics.setCheckClearTextPermitted(BuildInfo.targetsAtLeastO(a pplicationContext));
338 } 338 }
339 339
340 private void ensureChromiumStartedLocked(boolean onMainThread) { 340 private void ensureChromiumStartedLocked(boolean onMainThread) {
341 assert Thread.holdsLock(mLock); 341 assert Thread.holdsLock(mLock);
342 342
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 public ServiceWorkerController getServiceWorkerController() { 638 public ServiceWorkerController getServiceWorkerController() {
639 synchronized (mLock) { 639 synchronized (mLock) {
640 if (mServiceWorkerController == null) { 640 if (mServiceWorkerController == null) {
641 ensureChromiumStartedLocked(true); 641 ensureChromiumStartedLocked(true);
642 } 642 }
643 } 643 }
644 return (ServiceWorkerController) mServiceWorkerController; 644 return (ServiceWorkerController) mServiceWorkerController;
645 } 645 }
646 646
647 public TokenBindingService getTokenBindingService() { 647 public TokenBindingService getTokenBindingService() {
648 synchronized (mLock) { 648 synchronized (mLock) {
649 if (mTokenBindingManager == null) { 649 if (mTokenBindingManager == null) {
650 mTokenBindingManager = new TokenBindingManagerAdapter(this); 650 mTokenBindingManager = new TokenBindingManagerAdapter(this);
651 } 651 }
652 } 652 }
653 return (TokenBindingService) mTokenBindingManager; 653 return (TokenBindingService) mTokenBindingManager;
654 } 654 }
655 655
656 @Override 656 @Override
657 public android.webkit.WebIconDatabase getWebIconDatabase() { 657 public android.webkit.WebIconDatabase getWebIconDatabase() {
658 synchronized (mLock) { 658 synchronized (mLock) {
(...skipping 30 matching lines...) Expand all
689 WebViewDelegate getWebViewDelegate() { 689 WebViewDelegate getWebViewDelegate() {
690 return mWebViewDelegate; 690 return mWebViewDelegate;
691 } 691 }
692 692
693 // The method to support unreleased Android. 693 // The method to support unreleased Android.
694 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew, 694 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew,
695 Context context) { 695 Context context) {
696 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te); 696 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te);
697 } 697 }
698 } 698 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/ContentViewMiscTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698