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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/browser/BrowserStartupController.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
index 4bc3154c7ec6ae183561ac8188e4d523e4bb7d94..6881675050ccb821399e453a44b654aa2b2fdd15 100644
--- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
+++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
@@ -105,8 +105,13 @@ public class BrowserStartupController {
private int mLibraryProcessType;
- BrowserStartupController(Context context, int libraryProcessType) {
- mContext = context.getApplicationContext();
+ BrowserStartupController(
+ Context context, int libraryProcessType, boolean useApplicationContext) {
+ if (useApplicationContext) {
+ mContext = context.getApplicationContext();
+ } else {
+ mContext = context;
+ }
mAsyncStartupCallbacks = new ArrayList<StartupCallback>();
mLibraryProcessType = libraryProcessType;
}
@@ -120,13 +125,15 @@ public class BrowserStartupController {
* LibraryProcessType.PROCESS_WEBVIEW.
* @return BrowserStartupController instance.
*/
- public static BrowserStartupController get(Context context, int libraryProcessType) {
+ public static BrowserStartupController get(
+ Context context, int libraryProcessType, boolean useApplicationContext) {
assert ThreadUtils.runningOnUiThread() : "Tried to start the browser on the wrong thread.";
ThreadUtils.assertOnUiThread();
if (sInstance == null) {
assert LibraryProcessType.PROCESS_BROWSER == libraryProcessType
|| LibraryProcessType.PROCESS_WEBVIEW == libraryProcessType;
- sInstance = new BrowserStartupController(context, libraryProcessType);
+ sInstance = new BrowserStartupController(
+ context, libraryProcessType, useApplicationContext);
}
assert sInstance.mLibraryProcessType == libraryProcessType : "Wrong process type";
return sInstance;
@@ -150,6 +157,7 @@ public class BrowserStartupController {
*/
public void startBrowserProcessesAsync(final StartupCallback callback)
throws ProcessInitException {
+ Log.w("auraclank", "BrowserStartupController.startBrowserProcessesAsync");
assert ThreadUtils.runningOnUiThread() : "Tried to start the browser on the wrong thread.";
if (mStartupDone) {
// Browser process initialization has already been completed, so we can immediately post
@@ -171,6 +179,7 @@ public class BrowserStartupController {
@Override
public void run() {
ThreadUtils.assertOnUiThread();
+ Log.w("auraclank", "prepareToStartBrowserProcess callback called");
if (contentStart() > 0) {
// Failed. The callbacks may not have run, so run them.
enqueueCallbackExecution(STARTUP_FAILURE, NOT_ALREADY_STARTED);

Powered by Google App Engine
This is Rietveld 408576698