Index: content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java b/content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java |
index bf046f9751525369b574e7c7195b943c0ef551f4..e485d5a2f02a690608dbc9bd5abf072754f38551 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java |
@@ -45,10 +45,14 @@ public class AndroidBrowserProcess { |
* MAX_RENDERERS_SINGLE_PROCESS requests single-process mode where the renderer will run in the |
* application process in a separate thread. The maximum number of allowed renderers is capped |
* by MAX_RENDERERS_LIMIT. |
- * |
+ * @param mustBeImmediate true if initialization must be completed without creating additional |
+ * UI tasks |
+ * @param observer startup observer provides callback when startup complete. May be null if |
+ * no callback is required. |
* @return Whether the process actually needed to be initialized (false if already running). |
*/ |
- public static boolean init(Context context, int maxRendererProcesses) |
+ public static boolean init(Context context, int maxRendererProcesses, boolean mustBeImmediate, |
+ StartupObserver observer) |
throws ProcessInitException { |
assert maxRendererProcesses >= 0; |
assert maxRendererProcesses <= MAX_RENDERERS_LIMIT; |
@@ -75,11 +79,22 @@ public class AndroidBrowserProcess { |
nativeSetCommandLineFlags(maxRendererProcesses, |
nativeIsPluginEnabled() ? getPlugins(context) : null); |
ContentMain.initApplicationContext(appContext); |
- int result = ContentMain.start(); |
+ |
+ int result = ContentMain.start(mustBeImmediate, observer); |
if (result > 0) throw new ProcessInitException(result); |
return true; |
} |
+ /* |
+ * Old version of init, kept short term to simplify change to new version |
+ * TODO (aberent) : remove this once callers updated. |
+ */ |
+ @Deprecated |
+ public static boolean init(Context context, int maxRendererProcesses) |
+ throws ProcessInitException { |
+ return init(context, maxRendererProcesses, true, null); |
+ } |
+ |
/** |
* Initialization needed for tests. Mainly used by content browsertests. |
*/ |