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

Side by Side Diff: android_webview/native/aw_pdf_exporter.h

Issue 2863233002: [WebView] Move files from native to browser (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
7
8 #include <jni.h>
9
10 #include "base/android/jni_weak_ref.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "base/macros.h"
13
14 #include "printing/page_range.h"
15
16 namespace content {
17 class WebContents;
18 };
19
20 namespace printing {
21 class PrintSettings;
22 };
23
24 namespace android_webview {
25
26 class AwPdfExporter {
27 public:
28 AwPdfExporter(JNIEnv* env,
29 const base::android::JavaRef<jobject>& obj,
30 content::WebContents* web_contents);
31
32 ~AwPdfExporter();
33
34 void ExportToPdf(JNIEnv* env,
35 const base::android::JavaParamRef<jobject>& obj,
36 int fd,
37 jintArray pages,
38 const base::android::JavaParamRef<jobject>& cancel_signal);
39
40 private:
41 void InitPdfSettings(JNIEnv* env,
42 const base::android::JavaRef<jobject>& obj,
43 const printing::PageRanges& page_ranges,
44 printing::PrintSettings& settings);
45 void DidExportPdf(int fd, bool success);
46
47 JavaObjectWeakGlobalRef java_ref_;
48 content::WebContents* web_contents_;
49
50 DISALLOW_COPY_AND_ASSIGN(AwPdfExporter);
51 };
52
53 bool RegisterAwPdfExporter(JNIEnv* env);
54
55 } // namespace android_webview
56
57 #endif // ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698