| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 assert Thread.holdsLock(mLock) && ThreadUtils.runningOnUiThread(); | 224 assert Thread.holdsLock(mLock) && ThreadUtils.runningOnUiThread(); |
| 225 | 225 |
| 226 // The post-condition of this method is everything is ready, so notify n
ow to cover all | 226 // The post-condition of this method is everything is ready, so notify n
ow to cover all |
| 227 // return paths. (Other threads will not wake-up until we release |mLock
|, whatever). | 227 // return paths. (Other threads will not wake-up until we release |mLock
|, whatever). |
| 228 mLock.notifyAll(); | 228 mLock.notifyAll(); |
| 229 | 229 |
| 230 if (mStarted) { | 230 if (mStarted) { |
| 231 return; | 231 return; |
| 232 } | 232 } |
| 233 | 233 |
| 234 Context context = getWrappedCurrentApplicationContext(); |
| 234 try { | 235 try { |
| 235 LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW).ensureInitiali
zed(); | 236 LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW).ensureInitiali
zed(context); |
| 236 } catch (ProcessInitException e) { | 237 } catch (ProcessInitException e) { |
| 237 throw new RuntimeException("Error initializing WebView library", e); | 238 throw new RuntimeException("Error initializing WebView library", e); |
| 238 } | 239 } |
| 239 | 240 |
| 240 PathService.override(PathService.DIR_MODULE, "/system/lib/"); | 241 PathService.override(PathService.DIR_MODULE, "/system/lib/"); |
| 241 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); | 242 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); |
| 242 | 243 |
| 243 // Make sure that ResourceProvider is initialized before starting the br
owser process. | 244 // Make sure that ResourceProvider is initialized before starting the br
owser process. |
| 244 Context context = getWrappedCurrentApplicationContext(); | |
| 245 setUpResources(context); | 245 setUpResources(context); |
| 246 ResourceBundle.initializeLocalePaks(context, R.array.locale_paks); | 246 ResourceBundle.initializeLocalePaks(context, R.array.locale_paks); |
| 247 initPlatSupportLibrary(); | 247 initPlatSupportLibrary(); |
| 248 AwBrowserProcess.start(context); | 248 AwBrowserProcess.start(context); |
| 249 | 249 |
| 250 if (isBuildDebuggable()) { | 250 if (isBuildDebuggable()) { |
| 251 setWebContentsDebuggingEnabled(true); | 251 setWebContentsDebuggingEnabled(true); |
| 252 } | 252 } |
| 253 | 253 |
| 254 TraceEvent.setATraceEnabled(mWebViewDelegate.isTraceTagEnabled()); | 254 TraceEvent.setATraceEnabled(mWebViewDelegate.isTraceTagEnabled()); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 browserContext.getHttpAuthDatabase(context)); | 461 browserContext.getHttpAuthDatabase(context)); |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 return mWebViewDatabase; | 464 return mWebViewDatabase; |
| 465 } | 465 } |
| 466 | 466 |
| 467 WebViewDelegate getWebViewDelegate() { | 467 WebViewDelegate getWebViewDelegate() { |
| 468 return mWebViewDelegate; | 468 return mWebViewDelegate; |
| 469 } | 469 } |
| 470 } | 470 } |
| OLD | NEW |