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

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: Add test Created 5 years, 7 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 | « ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60d6c9c3fb69551b444808e8eb51af0b7c1a529b..5bd2c8a1e0f86348c67a13076becb3710c33068e 100644
--- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
@@ -251,6 +251,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.
@@ -414,6 +432,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);
}
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698