Chromium Code Reviews| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 final boolean isExternalService = true; | 412 final boolean isExternalService = true; |
| 413 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService); | 413 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService); |
| 414 AwBrowserProcess.start(); | 414 AwBrowserProcess.start(); |
| 415 | 415 |
| 416 final boolean enableMinidumpUploadingForTesting = CommandLine.getInstanc e().hasSwitch( | 416 final boolean enableMinidumpUploadingForTesting = CommandLine.getInstanc e().hasSwitch( |
| 417 CommandLineUtil.CRASH_UPLOADS_ENABLED_FOR_TESTING_SWITCH); | 417 CommandLineUtil.CRASH_UPLOADS_ENABLED_FOR_TESTING_SWITCH); |
| 418 if (enableMinidumpUploadingForTesting) { | 418 if (enableMinidumpUploadingForTesting) { |
| 419 AwBrowserProcess.handleMinidumps(webViewPackageName, true /* enabled */); | 419 AwBrowserProcess.handleMinidumps(webViewPackageName, true /* enabled */); |
| 420 } | 420 } |
| 421 | 421 |
| 422 // Actions conditioned on whether the Android Checkbox is toggled on | 422 // Actions conditioned on whether the Android Checkbox is toggled on |
|
timvolodine
2017/04/03 12:18:52
perhaps also provide a comment that the "createIns
paulmiller
2017/04/03 23:34:16
Done.
| |
| 423 PlatformServiceBridge.getInstance(context) | 423 PlatformServiceBridge.createInstance(context).queryMetricsSetting( |
|
Tobias Sargeant
2017/04/03 10:40:06
Keep this getInstance() and add a createInstance()
paulmiller
2017/04/03 23:34:16
IMHO, if we preemptively create our singletons as
Tobias Sargeant
2017/04/04 12:30:47
Is create-on-first-use really that much of a benef
| |
| 424 .queryMetricsSetting(new ValueCallback<Boolean>() { | 424 new ValueCallback<Boolean>() { |
| 425 public void onReceiveValue(Boolean enabled) { | 425 public void onReceiveValue(Boolean enabled) { |
| 426 ThreadUtils.assertOnUiThread(); | 426 ThreadUtils.assertOnUiThread(); |
| 427 AwMetricsServiceClient.setConsentSetting(context, enable d); | 427 AwMetricsServiceClient.setConsentSetting(context, enable d); |
| 428 | 428 |
| 429 if (!enableMinidumpUploadingForTesting) { | 429 if (!enableMinidumpUploadingForTesting) { |
| 430 AwBrowserProcess.handleMinidumps(webViewPackageName, enabled); | 430 AwBrowserProcess.handleMinidumps(webViewPackageName, enabled); |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 }); | 433 }); |
| 434 | 434 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 691 WebViewDelegate getWebViewDelegate() { | 691 WebViewDelegate getWebViewDelegate() { |
| 692 return mWebViewDelegate; | 692 return mWebViewDelegate; |
| 693 } | 693 } |
| 694 | 694 |
| 695 // The method to support unreleased Android. | 695 // The method to support unreleased Android. |
| 696 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew, | 696 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew, |
| 697 Context context) { | 697 Context context) { |
| 698 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te); | 698 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te); |
| 699 } | 699 } |
| 700 } | 700 } |
| OLD | NEW |