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.app.ActivityManager; | 7 import android.app.ActivityManager; |
| 8 import android.content.ComponentCallbacks2; | 8 import android.content.ComponentCallbacks2; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 import org.chromium.android_webview.AwContents; | 31 import org.chromium.android_webview.AwContents; |
| 32 import org.chromium.android_webview.AwContentsClient; | 32 import org.chromium.android_webview.AwContentsClient; |
| 33 import org.chromium.android_webview.AwContentsStatics; | 33 import org.chromium.android_webview.AwContentsStatics; |
| 34 import org.chromium.android_webview.AwCookieManager; | 34 import org.chromium.android_webview.AwCookieManager; |
| 35 import org.chromium.android_webview.AwDataReductionProxyManager; | 35 import org.chromium.android_webview.AwDataReductionProxyManager; |
| 36 import org.chromium.android_webview.AwDevToolsServer; | 36 import org.chromium.android_webview.AwDevToolsServer; |
| 37 import org.chromium.android_webview.AwQuotaManagerBridge; | 37 import org.chromium.android_webview.AwQuotaManagerBridge; |
| 38 import org.chromium.android_webview.AwResource; | 38 import org.chromium.android_webview.AwResource; |
| 39 import org.chromium.android_webview.AwSettings; | 39 import org.chromium.android_webview.AwSettings; |
| 40 import org.chromium.android_webview.R; | 40 import org.chromium.android_webview.R; |
| 41 import org.chromium.base.ApplicationStatus; | |
| 41 import org.chromium.base.CommandLine; | 42 import org.chromium.base.CommandLine; |
| 42 import org.chromium.base.MemoryPressureListener; | 43 import org.chromium.base.MemoryPressureListener; |
| 43 import org.chromium.base.PathService; | 44 import org.chromium.base.PathService; |
| 44 import org.chromium.base.PathUtils; | 45 import org.chromium.base.PathUtils; |
| 45 import org.chromium.base.ThreadUtils; | 46 import org.chromium.base.ThreadUtils; |
| 46 import org.chromium.base.TraceEvent; | 47 import org.chromium.base.TraceEvent; |
| 47 import org.chromium.base.annotations.SuppressFBWarnings; | 48 import org.chromium.base.annotations.SuppressFBWarnings; |
| 48 import org.chromium.base.library_loader.LibraryLoader; | 49 import org.chromium.base.library_loader.LibraryLoader; |
| 49 import org.chromium.base.library_loader.LibraryProcessType; | 50 import org.chromium.base.library_loader.LibraryProcessType; |
| 50 import org.chromium.base.library_loader.ProcessInitException; | 51 import org.chromium.base.library_loader.ProcessInitException; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 throw new RuntimeException("Error initializing WebView library", e); | 241 throw new RuntimeException("Error initializing WebView library", e); |
| 241 } | 242 } |
| 242 | 243 |
| 243 PathService.override(PathService.DIR_MODULE, "/system/lib/"); | 244 PathService.override(PathService.DIR_MODULE, "/system/lib/"); |
| 244 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi ew/paks"); | 245 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi ew/paks"); |
| 245 | 246 |
| 246 // Make sure that ResourceProvider is initialized before starting the br owser process. | 247 // Make sure that ResourceProvider is initialized before starting the br owser process. |
| 247 setUpResources(context); | 248 setUpResources(context); |
| 248 ResourceBundle.initializeLocalePaks(context, R.array.locale_paks); | 249 ResourceBundle.initializeLocalePaks(context, R.array.locale_paks); |
| 249 initPlatSupportLibrary(); | 250 initPlatSupportLibrary(); |
| 251 ApplicationStatus.initializeForWebView(mWebViewDelegate.getApplication() ); | |
|
boliu
2015/09/29 21:34:02
Let's move the ApplicationStatus call to out of th
timvolodine
2015/10/01 15:49:29
ok, I've moved this to a static method in AwBrowse
| |
| 250 AwBrowserProcess.start(context); | 252 AwBrowserProcess.start(context); |
| 251 | 253 |
| 252 if (isBuildDebuggable()) { | 254 if (isBuildDebuggable()) { |
| 253 setWebContentsDebuggingEnabled(true); | 255 setWebContentsDebuggingEnabled(true); |
| 254 } | 256 } |
| 255 | 257 |
| 256 TraceEvent.setATraceEnabled(mWebViewDelegate.isTraceTagEnabled()); | 258 TraceEvent.setATraceEnabled(mWebViewDelegate.isTraceTagEnabled()); |
| 257 mWebViewDelegate.setOnTraceEnabledChangeListener( | 259 mWebViewDelegate.setOnTraceEnabledChangeListener( |
| 258 new WebViewDelegate.OnTraceEnabledChangeListener() { | 260 new WebViewDelegate.OnTraceEnabledChangeListener() { |
| 259 @Override | 261 @Override |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 browserContext.getHttpAuthDatabase(context)); | 465 browserContext.getHttpAuthDatabase(context)); |
| 464 } | 466 } |
| 465 } | 467 } |
| 466 return mWebViewDatabase; | 468 return mWebViewDatabase; |
| 467 } | 469 } |
| 468 | 470 |
| 469 WebViewDelegate getWebViewDelegate() { | 471 WebViewDelegate getWebViewDelegate() { |
| 470 return mWebViewDelegate; | 472 return mWebViewDelegate; |
| 471 } | 473 } |
| 472 } | 474 } |
| OLD | NEW |