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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessService.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 - minor comment fixes 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/ChildProcessService.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
index 3d85310926cb657db415002f0e5e2b7bc5eb8090..016ffe40f6207f0ce5aaba0b57b5af20aeefee47 100644
--- a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
+++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
@@ -19,6 +19,7 @@ import android.view.Surface;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.content.browser.ChildProcessConnection;
+import org.chromium.content.browser.StartupObserver;
import org.chromium.content.common.IChildProcessCallback;
import org.chromium.content.common.IChildProcessService;
import org.chromium.content.browser.ChildProcessLauncher;
@@ -138,11 +139,12 @@ public class ChildProcessService extends Service {
fileIds[i] = mFileIds.get(i);
fileFds[i] = mFileFds.get(i).detachFd();
}
- ContentMain.initApplicationContext(sContext.get().getApplicationContext());
+ ContentMain contentMain = new ContentMain();
+ contentMain.initApplicationContext(sContext.get().getApplicationContext());
nativeInitChildProcess(sContext.get().getApplicationContext(),
ChildProcessService.this, fileIds, fileFds,
mCpuCount, mCpuFeatures);
- ContentMain.start();
+ contentMain.start(true, new StartupObserver());
joth 2013/07/22 16:28:15 initApplicationContext & start are still static (I
aberent 2013/07/22 19:37:40 Done. I should have reverted these changes; at one
nativeExitChildProcess();
} catch (InterruptedException e) {
Log.w(TAG, MAIN_THREAD_NAME + " startup failed: " + e);

Powered by Google App Engine
This is Rietveld 408576698