cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / android_webview / native / aw_pdf_exporter.h
blobf2513f82b2fde4d952795bd32f7852ced13a1565
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.
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
8 #include <jni.h>
10 #include "base/android/jni_weak_ref.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "base/basictypes.h"
13 #include "skia/ext/refptr.h"
15 namespace content {
16 class WebContents;
19 namespace printing {
20 class PrintSettings;
23 namespace android_webview {
25 class AwPdfExporter {
26 public:
27 AwPdfExporter(JNIEnv* env,
28 jobject obj,
29 content::WebContents* web_contents);
31 ~AwPdfExporter();
33 void ExportToPdf(JNIEnv* env,
34 jobject obj,
35 int fd,
36 jobject cancel_signal);
38 private:
39 void InitPdfSettings(JNIEnv* env,
40 jobject obj,
41 printing::PrintSettings& settings);
42 void DidExportPdf(int fd, bool success);
44 JavaObjectWeakGlobalRef java_ref_;
45 content::WebContents* web_contents_;
47 DISALLOW_COPY_AND_ASSIGN(AwPdfExporter);
50 bool RegisterAwPdfExporter(JNIEnv* env);
52 } // namespace android_webview
54 #endif // ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_