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

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

Issue 54963005: Upstream printing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address code review Created 7 years, 1 month 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 edc2347e16c4a0995160b437bb6a39a6e26a1f45..ff04f0071cfa9e4c51074f30eea403e42aadcd2b 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -193,6 +193,8 @@ public class AwContents {
private ComponentCallbacks2 mComponentCallbacks;
+ private AwPdfExporter mAwPdfExporter;
+
private static final class DestroyRunnable implements Runnable {
private final int mNativeAwContents;
private DestroyRunnable(int nativeAwContents) {
@@ -691,6 +693,18 @@ public class AwContents {
return mSettings;
}
+ public AwPdfExporter getPdfExporter() {
+ // mNativeAwContents can be null, due to destroy().
+ if (mNativeAwContents == 0) {
+ return null;
+ }
+ if (mAwPdfExporter == null) {
+ mAwPdfExporter = new AwPdfExporter(mContainerView);
+ nativeCreatePdfExporter(mNativeAwContents, mAwPdfExporter);
+ }
+ return mAwPdfExporter;
+ }
+
public static void setAwDrawSWFunctionTable(int functionTablePointer) {
nativeSetAwDrawSWFunctionTable(functionTablePointer);
}
@@ -2077,4 +2091,7 @@ public class AwContents {
private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean networkUp);
private native void nativeTrimMemory(int nativeAwContents, int level);
+
+ private native void nativeCreatePdfExporter(
+ int nativeAwContents, AwPdfExporter awPdfExporter);
}

Powered by Google App Engine
This is Rietveld 408576698