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

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

Issue 2784353002: Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: Fix 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/java/src/org/chromium/android_webview/AndroidProtocolHandler.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW).ensureInitiali zed(); 397 LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW).ensureInitiali zed();
398 } catch (ProcessInitException e) { 398 } catch (ProcessInitException e) {
399 throw new RuntimeException("Error initializing WebView library", e); 399 throw new RuntimeException("Error initializing WebView library", e);
400 } 400 }
401 401
402 PathService.override(PathService.DIR_MODULE, "/system/lib/"); 402 PathService.override(PathService.DIR_MODULE, "/system/lib/");
403 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi ew/paks"); 403 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi ew/paks");
404 404
405 final Context context = ContextUtils.getApplicationContext(); 405 final Context context = ContextUtils.getApplicationContext();
406 // Future calls to PlatformServiceBridge.getInstance() rely on it having been created here. 406 // Future calls to PlatformServiceBridge.getInstance() rely on it having been created here.
407 PlatformServiceBridge.getOrCreateInstance(context); 407 PlatformServiceBridge.getOrCreateInstance();
408 408
409 // Make sure that ResourceProvider is initialized before starting the br owser process. 409 // Make sure that ResourceProvider is initialized before starting the br owser process.
410 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn fo(); 410 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn fo();
411 final String webViewPackageName = webViewPackageInfo.packageName; 411 final String webViewPackageName = webViewPackageInfo.packageName;
412 setUpResources(webViewPackageInfo, context); 412 setUpResources(webViewPackageInfo, context);
413 initPlatSupportLibrary(); 413 initPlatSupportLibrary();
414 doNetworkInitializations(context); 414 doNetworkInitializations(context);
415 final boolean isExternalService = true; 415 final boolean isExternalService = true;
416 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService); 416 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService);
417 AwBrowserProcess.start(); 417 AwBrowserProcess.start();
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 WebViewDelegate getWebViewDelegate() { 693 WebViewDelegate getWebViewDelegate() {
694 return mWebViewDelegate; 694 return mWebViewDelegate;
695 } 695 }
696 696
697 // The method to support unreleased Android. 697 // The method to support unreleased Android.
698 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew, 698 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew,
699 Context context) { 699 Context context) {
700 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te); 700 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te);
701 } 701 }
702 } 702 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AndroidProtocolHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698