Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java

Issue 2583913002: Fix webview preloading in zygote. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 deleteContents(file); 302 deleteContents(file);
303 } 303 }
304 if (!file.delete()) { 304 if (!file.delete()) {
305 Log.w(TAG, "Failed to delete " + file); 305 Log.w(TAG, "Failed to delete " + file);
306 } 306 }
307 } 307 }
308 } 308 }
309 } 309 }
310 310
311 public static boolean preloadInZygote() { 311 public static boolean preloadInZygote() {
312 try {
313 LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW_CHILD);
314 } catch (ProcessInitException e) {
315 throw new RuntimeException("Failed to init LibraryLoader", e);
316 }
312 for (String library : NativeLibraries.LIBRARIES) { 317 for (String library : NativeLibraries.LIBRARIES) {
313 System.loadLibrary(library); 318 System.loadLibrary(library);
314 } 319 }
315 return true; 320 return true;
316 } 321 }
317 322
318 private void initPlatSupportLibrary() { 323 private void initPlatSupportLibrary() {
319 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction ()); 324 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction ());
320 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable ()); 325 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable ());
321 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable ()); 326 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable ());
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 this, HttpAuthDatabase.newInstance(context, HTTP_AUTH_DA TABASE_FILE)); 656 this, HttpAuthDatabase.newInstance(context, HTTP_AUTH_DA TABASE_FILE));
652 } 657 }
653 } 658 }
654 return mWebViewDatabase; 659 return mWebViewDatabase;
655 } 660 }
656 661
657 WebViewDelegate getWebViewDelegate() { 662 WebViewDelegate getWebViewDelegate() {
658 return mWebViewDelegate; 663 return mWebViewDelegate;
659 } 664 }
660 } 665 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698