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

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

Issue 1377593003: Refactor BrowserViewRenderer to support page visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 29c1e28c9eec017494071563fca0fd67cbab6cd5..1e3536e020f2e307d244f80a2f05495a190e34b0 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -2289,7 +2289,7 @@ public class AwContents implements SmartClipProvider,
if (isDestroyed()) return;
boolean contentViewCoreVisible = !mIsPaused;
if (mEnablePageVisibility) {
- contentViewCoreVisible = contentViewCoreVisible && mIsWindowVisible && mIsViewVisible;
+ contentViewCoreVisible = contentViewCoreVisible && nativeIsVisible(mNativeAwContents);
}
if (contentViewCoreVisible && !mIsContentViewCoreVisible) {
@@ -3123,7 +3123,8 @@ public class AwContents implements SmartClipProvider,
private native void nativeSetWindowVisibility(long nativeAwContents, boolean visible);
private native void nativeSetIsPaused(long nativeAwContents, boolean paused);
private native void nativeOnAttachedToWindow(long nativeAwContents, int w, int h);
- private static native void nativeOnDetachedFromWindow(long nativeAwContents);
+ private native void nativeOnDetachedFromWindow(long nativeAwContents);
+ private native boolean nativeIsVisible(long nativeAwContents);
private native void nativeSetDipScale(long nativeAwContents, float dipScale);
// Returns null if save state fails.

Powered by Google App Engine
This is Rietveld 408576698