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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java

Issue 1378653002: [Android] Enable ApplicationStatus for WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 3 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: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index 0989339b969783fb484cf3eec493e0da9250c82c..6ea8c089bda390ba80b040f2ccd76a2398dad500 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -4,8 +4,10 @@
package org.chromium.android_webview;
+import android.app.Application;
import android.content.Context;
+import org.chromium.base.ApplicationStatus;
import org.chromium.base.CommandLine;
import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils;
@@ -42,6 +44,13 @@ public abstract class AwBrowserProcess {
}
/**
+ * Initializes ApplicationStatus to listen for Activity state changes.
+ */
+ public static void initApplicationStatus(Application application, Context wrappedContext) {
boliu 2015/10/01 16:59:01 actually moving this into start was a *really* goo
timvolodine 2015/10/02 14:55:09 Done.
+ ApplicationStatus.initializeForWebView(application, wrappedContext);
+ }
+
+ /**
* Starts the chromium browser process running within this process. Creates threads
* and performs other per-app resource allocations; must not be called from zygote.
* Note: it is up to the caller to ensure this is only called once.

Powered by Google App Engine
This is Rietveld 408576698