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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ContentMain.java

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run the later parts of startup as UI thread tasks - patch for Yaron's comments Created 7 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/app/ContentMain.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ContentMain.java b/content/public/android/java/src/org/chromium/content/app/ContentMain.java
index 09ba783a1557a776eaf07d1caf6dfb59eb3c17cd..6f2f610d4e84d2ac38e6f11d90af632983e5fd51 100644
--- a/content/public/android/java/src/org/chromium/content/app/ContentMain.java
+++ b/content/public/android/java/src/org/chromium/content/app/ContentMain.java
@@ -7,6 +7,7 @@ package org.chromium.content.app;
import android.content.Context;
import org.chromium.base.JNINamespace;
+import org.chromium.content.browser.StartupObserver;
/**
* This class is used to initialize all types of process. It corresponds to
@@ -29,11 +30,17 @@ public class ContentMain {
/**
* Start the ContentMainRunner in native side.
+ *
+ * @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 required.
+ * @result the result of the startup attempt. OK if <= 0. Values > 0 are error codes.
**/
- public static int start() {
- return nativeStart();
+ public static int start(boolean mustBeImmediate, StartupObserver observer) {
+ return nativeStart(mustBeImmediate, observer);
}
private static native void nativeInitApplicationContext(Context context);
- private static native int nativeStart();
+ private static native int nativeStart(boolean mustBeImmediate, StartupObserver observer);
};

Powered by Google App Engine
This is Rietveld 408576698