| 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 | 8 |
| 9 import org.chromium.base.PathUtils; | 9 import org.chromium.base.PathUtils; |
| 10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
| 11 import org.chromium.content.app.LibraryLoader; | 11 import org.chromium.content_public.app.LibraryLoader; |
| 12 import org.chromium.content.browser.BrowserStartupController; | 12 import org.chromium.content_public.browser.BrowserStartupController; |
| 13 import org.chromium.content.common.ProcessInitException; | 13 import org.chromium.content_public.common.ProcessInitException; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Wrapper for the steps needed to initialize the java and native sides of webvi
ew chromium. | 16 * Wrapper for the steps needed to initialize the java and native sides of webvi
ew chromium. |
| 17 */ | 17 */ |
| 18 public abstract class AwBrowserProcess { | 18 public abstract class AwBrowserProcess { |
| 19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "webview"; | 19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "webview"; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Loads the native library, and performs basic static construction of objec
ts needed | 22 * Loads the native library, and performs basic static construction of objec
ts needed |
| 23 * to run webview in this process. Does not create threads; safe to call fro
m zygote. | 23 * to run webview in this process. Does not create threads; safe to call fro
m zygote. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 48 try { | 48 try { |
| 49 BrowserStartupController.get(context).startBrowserProcessesS
ync( | 49 BrowserStartupController.get(context).startBrowserProcessesS
ync( |
| 50 BrowserStartupController.MAX_RENDERERS_SINGLE_PR
OCESS); | 50 BrowserStartupController.MAX_RENDERERS_SINGLE_PR
OCESS); |
| 51 } catch (ProcessInitException e) { | 51 } catch (ProcessInitException e) { |
| 52 throw new RuntimeException("Cannot initialize WebView", e); | 52 throw new RuntimeException("Cannot initialize WebView", e); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 }); | 55 }); |
| 56 } | 56 } |
| 57 } | 57 } |
| OLD | NEW |