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( |