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

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: Code review 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 087022180a040d72c42908dad0ff3afd439866f5..0bf7bd1ade48d9faf55f2c80dffaa5e696475318 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.
@@ -351,6 +369,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