| 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 d962d9f292d144a1577c06d4da1afe675f3961b7..6f3f47ae26c4f82fd4c2e4a65fa75c77ef9bd79c 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -194,6 +194,8 @@ public class AwContents {
|
|
|
| private ComponentCallbacks2 mComponentCallbacks;
|
|
|
| + private AwPdfExporter mAwPdfExporter;
|
| +
|
| private static final class DestroyRunnable implements Runnable {
|
| private int mNativeAwContents;
|
| private DestroyRunnable(int nativeAwContents) {
|
| @@ -705,6 +707,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);
|
| }
|
| @@ -2085,4 +2099,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);
|
| }
|
|
|