| 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 c1c1cc282b1fb1bc3772b3787dd52e18cae4a0d1..bb4222c87c273f6e8a5a8a32fc91e7805fdd5e50 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 long mNativeAwContents;
|
| private DestroyRunnable(long nativeAwContents) {
|
| @@ -689,6 +691,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);
|
| }
|
| @@ -2076,4 +2090,6 @@ public class AwContents {
|
| private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp);
|
|
|
| private native void nativeTrimMemory(long nativeAwContents, int level);
|
| +
|
| + private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExporter awPdfExporter);
|
| }
|
|
|