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

Unified Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java

Issue 2376673002: When onPageFinished calls onNewPicture, pass null picture on SDK>=JB MR2. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
index 58b6fd2fceed122669ff894c65afe1ef80205f65..0748152047771c619c4a2ad238d46ac1ae12cab7 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
@@ -100,6 +100,8 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
private WebView.FindListener mFindListener;
// The listener receiving notifications of screen updates.
private WebView.PictureListener mPictureListener;
+ // Whether the picture listener is invalidate only (i.e. receives a null Picture)
+ private boolean mPictureListenerInvalidateOnly;
private WebViewDelegate mWebViewDelegate;
@@ -181,8 +183,9 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
mFindListener = listener;
}
- void setPictureListener(WebView.PictureListener listener) {
+ void setPictureListener(WebView.PictureListener listener, boolean invalidateOnly) {
mPictureListener = listener;
+ mPictureListenerInvalidateOnly = invalidateOnly;
}
//--------------------------------------------------------------------------------------------
@@ -549,7 +552,8 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
public void run() {
if (mPictureListener != null) {
if (TRACE) Log.d(TAG, "onPageFinished-fake");
- mPictureListener.onNewPicture(mWebView, new Picture());
+ mPictureListener.onNewPicture(mWebView,
+ mPictureListenerInvalidateOnly ? null : new Picture());
}
}
}, 100);
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698