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

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

Issue 2770713003: Enable page selection for WebView printing (Closed)
Patch Set: review fixes Created 3 years, 9 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/AwPdfExporter.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwPdfExporter.java b/android_webview/java/src/org/chromium/android_webview/AwPdfExporter.java
index b22350e90043dd9265390f20e42aa5521e06f97f..53aa447e0f4f25bd04da3daf14af6523da1534e8 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwPdfExporter.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwPdfExporter.java
@@ -46,9 +46,8 @@ public class AwPdfExporter {
mContainerView = containerView;
}
- public void exportToPdf(final ParcelFileDescriptor fd, PrintAttributes attributes,
+ public void exportToPdf(final ParcelFileDescriptor fd, PrintAttributes attributes, int[] pages,
ValueCallback<Boolean> resultCallback, CancellationSignal cancellationSignal) {
-
if (fd == null) {
throw new IllegalArgumentException("fd cannot be null");
}
@@ -74,7 +73,7 @@ public class AwPdfExporter {
mResultCallback = resultCallback;
mAttributes = attributes;
mFd = fd;
- nativeExportToPdf(mNativeAwPdfExporter, mFd.getFd(), cancellationSignal);
+ nativeExportToPdf(mNativeAwPdfExporter, mFd.getFd(), pages, cancellationSignal);
}
@CalledByNative
@@ -149,6 +148,6 @@ public class AwPdfExporter {
return mAttributes.getMinMargins().getBottomMils();
}
- private native void nativeExportToPdf(long nativeAwPdfExporter, int fd,
- CancellationSignal cancellationSignal);
+ private native void nativeExportToPdf(
+ long nativeAwPdfExporter, int fd, int[] pages, CancellationSignal cancellationSignal);
}

Powered by Google App Engine
This is Rietveld 408576698