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

Unified Diff: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java

Issue 1001573003: [Android] Stop hiding the RWHV layer subtree when hiding the widget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Semi-working build Created 5 years, 9 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: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
index 0816862868804eaeaea3c3fb56638ba7f5bb52f5..81cdc7850ee7ab1cb5b3f2f7313035777bf160c0 100644
--- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
@@ -236,6 +236,24 @@ public class WindowAndroid {
}
/**
+ * For window instances associated with an activity, notifies any listeners
+ * that the activity has been paused.
+ */
+ protected void onActivityPaused() {
+ if (mNativeWindowAndroid == 0) return;
+ nativeOnActivityPaused(mNativeWindowAndroid);
+ }
+
+ /**
+ * For window instances associated with an activity, notifies any listeners
+ * that the activity has been paused.
+ */
+ protected void onActivityResumed() {
+ if (mNativeWindowAndroid == 0) return;
+ nativeOnActivityResumed(mNativeWindowAndroid);
+ }
+
+ /**
* Responds to the intent result if the intent was created by the native window.
* @param requestCode Request code of the requested intent.
* @param resultCode Result code of the requested intent.
@@ -352,6 +370,8 @@ public class WindowAndroid {
private native void nativeOnVSync(long nativeWindowAndroid,
long vsyncTimeMicros,
long vsyncPeriodMicros);
+ private native void nativeOnActivityPaused(long nativeWindowAndroid);
+ private native void nativeOnActivityResumed(long nativeWindowAndroid);
private native void nativeDestroy(long nativeWindowAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698