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

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

Issue 10701177: Make content shell on android support relaunching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and removed unnecessary content:: namespacing. Created 8 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentView.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 076dabc8118ffee0bc10eeeb6dfcf8fa08aa9c9b..4a075bc0bf0a842ed185182e651f6be8625432ef 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
@@ -13,8 +13,6 @@ import org.chromium.base.JNINamespace;
import org.chromium.content.app.AppResource;
import org.chromium.content.app.ContentMain;
import org.chromium.content.app.LibraryLoader;
-import org.chromium.content.browser.ContentView;
-import org.chromium.content.browser.ResourceExtractor;
import org.chromium.content.common.CommandLine;
// NOTE: This file hasn't been fully upstreamed, please don't merge to downstream.
@@ -59,9 +57,10 @@ public class AndroidBrowserProcess {
*
* @param context Context used to obtain the application context.
* @param maxRendererProcesses See ContentView.enableMultiProcess().
+ * @return Whether the process actually needed to be initialized (false if already running).
*/
- public static void initContentViewProcess(Context context, int maxRendererProcesses) {
- genericChromiumProcessInit(context, maxRendererProcesses, false);
+ public static boolean initContentViewProcess(Context context, int maxRendererProcesses) {
+ return genericChromiumProcessInit(context, maxRendererProcesses, false);
}
/**
@@ -70,9 +69,10 @@ public class AndroidBrowserProcess {
*
* @param context Context used to obtain the application context.
* @param maxRendererProcesses See ContentView.enableMultiProcess().
+ * @return Whether the process actually needed to be initialized (false if already running).
*/
- public static void initChromiumBrowserProcess(Context context, int maxRendererProcesses) {
- genericChromiumProcessInit(context, maxRendererProcesses, true);
+ public static boolean initChromiumBrowserProcess(Context context, int maxRendererProcesses) {
+ return genericChromiumProcessInit(context, maxRendererProcesses, true);
}
/**
@@ -80,12 +80,11 @@ public class AndroidBrowserProcess {
* @param context Context used to obtain the application context
* @param maxRendererProcesses See ContentView.enableMultiProcess()
* @param hostIsChrome pass true if running as the system browser process.
+ * @return Whether the process actually needed to be initialized (false if already running).
*/
- private static void genericChromiumProcessInit(Context context, int maxRendererProcesses,
+ private static boolean genericChromiumProcessInit(Context context, int maxRendererProcesses,
boolean hostIsChrome) {
- if (sInitialized) {
- return;
- }
+ if (sInitialized) return false;
sInitialized = true;
// Normally Main.java will have kicked this off asynchronously for Chrome. But
@@ -128,6 +127,7 @@ public class AndroidBrowserProcess {
nativeSetCommandLineFlags(maxRenderers, getPlugins(context));
ContentMain.initApplicationContext(appContext);
ContentMain.start();
+ return true;
}
private static String getPlugins(final Context context) {
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698