OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 org.chromium.android_webview; | 5 package org.chromium.android_webview; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.Build; | 8 import android.os.Build; |
9 import android.util.Log; | 9 import android.util.Log; |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 private static final String TAG = "AwBrowserProcess"; | 26 private static final String TAG = "AwBrowserProcess"; |
27 | 27 |
28 /** | 28 /** |
29 * Loads the native library, and performs basic static construction of objec
ts needed | 29 * Loads the native library, and performs basic static construction of objec
ts needed |
30 * to run webview in this process. Does not create threads; safe to call fro
m zygote. | 30 * to run webview in this process. Does not create threads; safe to call fro
m zygote. |
31 * Note: it is up to the caller to ensure this is only called once. | 31 * Note: it is up to the caller to ensure this is only called once. |
32 */ | 32 */ |
33 public static void loadLibrary() { | 33 public static void loadLibrary() { |
34 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); | 34 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
35 try { | 35 try { |
36 LibraryLoader.loadNow(); | 36 LibraryLoader.loadNow(null); |
37 initTraceEvent(); | 37 initTraceEvent(); |
38 } catch (ProcessInitException e) { | 38 } catch (ProcessInitException e) { |
39 throw new RuntimeException("Cannot load WebView", e); | 39 throw new RuntimeException("Cannot load WebView", e); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 // TODO(benm): Move this function into WebView code in Android tree to avoid
reflection. | 43 // TODO(benm): Move this function into WebView code in Android tree to avoid
reflection. |
44 private static void initTraceEvent() { | 44 private static void initTraceEvent() { |
45 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) return; | 45 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) return; |
46 | 46 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 try { | 102 try { |
103 BrowserStartupController.get(context).startBrowserProcessesS
ync( | 103 BrowserStartupController.get(context).startBrowserProcessesS
ync( |
104 BrowserStartupController.MAX_RENDERERS_SINGLE_PR
OCESS); | 104 BrowserStartupController.MAX_RENDERERS_SINGLE_PR
OCESS); |
105 } catch (ProcessInitException e) { | 105 } catch (ProcessInitException e) { |
106 throw new RuntimeException("Cannot initialize WebView", e); | 106 throw new RuntimeException("Cannot initialize WebView", e); |
107 } | 107 } |
108 } | 108 } |
109 }); | 109 }); |
110 } | 110 } |
111 } | 111 } |
OLD | NEW |