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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 if (mStarted) { | 230 if (mStarted) { |
231 return; | 231 return; |
232 } | 232 } |
233 | 233 |
234 // We don't need to extract any paks because for WebView, they are | 234 // We don't need to extract any paks because for WebView, they are |
235 // in the system image. | 235 // in the system image. |
236 ResourceExtractor.setMandatoryPaksToExtract(""); | 236 ResourceExtractor.setMandatoryPaksToExtract(""); |
237 | 237 |
238 try { | 238 try { |
239 LibraryLoader.ensureInitialized(); | 239 LibraryLoader.get(LibraryLoader.WEBVIEW).ensureInitialized(); |
240 } catch (ProcessInitException e) { | 240 } catch (ProcessInitException e) { |
241 throw new RuntimeException("Error initializing WebView library", e); | 241 throw new RuntimeException("Error initializing WebView library", e); |
242 } | 242 } |
243 | 243 |
244 PathService.override(PathService.DIR_MODULE, "/system/lib/"); | 244 PathService.override(PathService.DIR_MODULE, "/system/lib/"); |
245 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); | 245 PathService.override(DIR_RESOURCE_PAKS_ANDROID, "/system/framework/webvi
ew/paks"); |
246 | 246 |
247 // 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. |
248 Context context = getWrappedCurrentApplicationContext(); | 248 Context context = getWrappedCurrentApplicationContext(); |
249 setUpResources(context); | 249 setUpResources(context); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 browserContext.getHttpAuthDatabase(context)); | 469 browserContext.getHttpAuthDatabase(context)); |
470 } | 470 } |
471 } | 471 } |
472 return mWebViewDatabase; | 472 return mWebViewDatabase; |
473 } | 473 } |
474 | 474 |
475 WebViewDelegate getWebViewDelegate() { | 475 WebViewDelegate getWebViewDelegate() { |
476 return mWebViewDelegate; | 476 return mWebViewDelegate; |
477 } | 477 } |
478 } | 478 } |
OLD | NEW |