| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |