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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); | 410 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); |
411 | 411 |
412 // Make sure that ResourceProvider is initialized before starting the br
owser process. | 412 // Make sure that ResourceProvider is initialized before starting the br
owser process. |
413 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn
fo(); | 413 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn
fo(); |
414 final String webViewPackageName = webViewPackageInfo.packageName; | 414 final String webViewPackageName = webViewPackageInfo.packageName; |
415 final Context context = ContextUtils.getApplicationContext(); | 415 final Context context = ContextUtils.getApplicationContext(); |
416 setUpResources(webViewPackageInfo, context); | 416 setUpResources(webViewPackageInfo, context); |
417 initPlatSupportLibrary(); | 417 initPlatSupportLibrary(); |
418 doNetworkInitializations(context); | 418 doNetworkInitializations(context); |
419 final boolean isExternalService = true; | 419 final boolean isExternalService = true; |
| 420 AwBrowserProcess.setWebViewPackageName(webViewPackageName); |
420 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt
ernalService); | 421 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt
ernalService); |
421 AwBrowserProcess.start(); | 422 AwBrowserProcess.start(); |
422 | 423 |
423 final boolean enableMinidumpUploadingForTesting = CommandLine.getInstanc
e().hasSwitch( | 424 final boolean enableMinidumpUploadingForTesting = CommandLine.getInstanc
e().hasSwitch( |
424 CommandLineUtil.CRASH_UPLOADS_ENABLED_FOR_TESTING_SWITCH); | 425 CommandLineUtil.CRASH_UPLOADS_ENABLED_FOR_TESTING_SWITCH); |
425 if (enableMinidumpUploadingForTesting) { | 426 if (enableMinidumpUploadingForTesting) { |
426 AwBrowserProcess.handleMinidumps(webViewPackageName, true /* enabled
*/); | 427 AwBrowserProcess.handleMinidumps(webViewPackageName, true /* enabled
*/); |
427 } | 428 } |
428 | 429 |
429 PlatformServiceBridge.getInstance().queryMetricsSetting(new ValueCallbac
k<Boolean>() { | 430 PlatformServiceBridge.getInstance().queryMetricsSetting(new ValueCallbac
k<Boolean>() { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 WebViewDelegate getWebViewDelegate() { | 698 WebViewDelegate getWebViewDelegate() { |
698 return mWebViewDelegate; | 699 return mWebViewDelegate; |
699 } | 700 } |
700 | 701 |
701 // The method to support unreleased Android. | 702 // The method to support unreleased Android. |
702 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV
iew, | 703 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV
iew, |
703 Context context) { | 704 Context context) { |
704 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega
te); | 705 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega
te); |
705 } | 706 } |
706 } | 707 } |
OLD | NEW |