OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class AwPdfExporter { | 25 class AwPdfExporter { |
26 public: | 26 public: |
27 AwPdfExporter(JNIEnv* env, | 27 AwPdfExporter(JNIEnv* env, |
28 jobject obj, | 28 jobject obj, |
29 content::WebContents* web_contents); | 29 content::WebContents* web_contents); |
30 | 30 |
31 ~AwPdfExporter(); | 31 ~AwPdfExporter(); |
32 | 32 |
33 void ExportToPdf(JNIEnv* env, | 33 void ExportToPdf(JNIEnv* env, |
34 jobject obj, | 34 const base::android::JavaParamRef<jobject>& obj, |
35 int fd, | 35 int fd, |
36 jobject cancel_signal); | 36 const base::android::JavaParamRef<jobject>& cancel_signal); |
37 | 37 |
38 private: | 38 private: |
39 void InitPdfSettings(JNIEnv* env, | 39 void InitPdfSettings(JNIEnv* env, |
40 jobject obj, | 40 jobject obj, |
41 printing::PrintSettings& settings); | 41 printing::PrintSettings& settings); |
42 void DidExportPdf(int fd, bool success); | 42 void DidExportPdf(int fd, bool success); |
43 | 43 |
44 JavaObjectWeakGlobalRef java_ref_; | 44 JavaObjectWeakGlobalRef java_ref_; |
45 content::WebContents* web_contents_; | 45 content::WebContents* web_contents_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(AwPdfExporter); | 47 DISALLOW_COPY_AND_ASSIGN(AwPdfExporter); |
48 }; | 48 }; |
49 | 49 |
50 bool RegisterAwPdfExporter(JNIEnv* env); | 50 bool RegisterAwPdfExporter(JNIEnv* env); |
51 | 51 |
52 } // namespace android_webview | 52 } // namespace android_webview |
53 | 53 |
54 #endif // ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ | 54 #endif // ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_ |
OLD | NEW |