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

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

Issue 22035002: Android WebView: Make a custom Picture subclass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 01127a63398f4a4ec8f81d965ca87192bb8c7bac..da2267f05cbf58708f3fe99dab0c7dcf6e74c230 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -684,9 +684,10 @@ public class AwContents {
}
public Picture capturePicture() {
- return nativeCapturePicture(mNativeAwContents,
- mScrollOffsetManager.computeHorizontalScrollRange(),
- mScrollOffsetManager.computeVerticalScrollRange());
+ return new AwPicture(nativeCapturePicture(mNativeAwContents,
+ mScrollOffsetManager.computeHorizontalScrollRange(),
+ mScrollOffsetManager.computeVerticalScrollRange()),
+ mContainerView.getContext().getApplicationInfo().targetSdkVersion <= 18);
}
/**
@@ -1771,7 +1772,7 @@ public class AwContents {
private native void nativeSetBackgroundColor(int nativeAwContents, int color);
private native int nativeGetAwDrawGLViewContext(int nativeAwContents);
- private native Picture nativeCapturePicture(int nativeAwContents, int width, int height);
+ private native int nativeCapturePicture(int nativeAwContents, int width, int height);
private native void nativeEnableOnNewPicture(int nativeAwContents, boolean enabled);
private native void nativeInvokeGeolocationCallback(

Powered by Google App Engine
This is Rietveld 408576698