| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } | |
| 317 for (String library : NativeLibraries.LIBRARIES) { | 312 for (String library : NativeLibraries.LIBRARIES) { |
| 318 System.loadLibrary(library); | 313 System.loadLibrary(library); |
| 319 } | 314 } |
| 320 return true; | 315 return true; |
| 321 } | 316 } |
| 322 | 317 |
| 323 private void initPlatSupportLibrary() { | 318 private void initPlatSupportLibrary() { |
| 324 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction
()); | 319 DrawGLFunctor.setChromiumAwDrawGLFunction(AwContents.getAwDrawGLFunction
()); |
| 325 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable
()); | 320 AwContents.setAwDrawSWFunctionTable(GraphicsUtils.getDrawSWFunctionTable
()); |
| 326 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable
()); | 321 AwContents.setAwDrawGLFunctionTable(GraphicsUtils.getDrawGLFunctionTable
()); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 this, HttpAuthDatabase.newInstance(context, HTTP_AUTH_DA
TABASE_FILE)); | 651 this, HttpAuthDatabase.newInstance(context, HTTP_AUTH_DA
TABASE_FILE)); |
| 657 } | 652 } |
| 658 } | 653 } |
| 659 return mWebViewDatabase; | 654 return mWebViewDatabase; |
| 660 } | 655 } |
| 661 | 656 |
| 662 WebViewDelegate getWebViewDelegate() { | 657 WebViewDelegate getWebViewDelegate() { |
| 663 return mWebViewDelegate; | 658 return mWebViewDelegate; |
| 664 } | 659 } |
| 665 } | 660 } |
| OLD | NEW |