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

Unified Diff: android_webview/native/aw_pdf_exporter.h

Issue 54963005: Upstream printing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address code review Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_pdf_exporter.h
diff --git a/android_webview/native/aw_pdf_exporter.h b/android_webview/native/aw_pdf_exporter.h
new file mode 100644
index 0000000000000000000000000000000000000000..53cb56a3dc19f06acfc6b10ea0b318ce8b1db084
--- /dev/null
+++ b/android_webview/native/aw_pdf_exporter.h
@@ -0,0 +1,66 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
+#define ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_
+
+#include <jni.h>
+
+#include "android_webview/browser/renderer_host/print_manager.h"
+#include "base/android/jni_helper.h"
+#include "base/android/scoped_java_ref.h"
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkPicture.h"
joth 2013/11/21 19:38:03 remove me
sgurun-gerrit only 2013/11/23 01:49:11 Done.
+
+namespace content {
+class WebContents;
+};
+
+namespace printing {
+class PrintSettings;
+};
+
+namespace android_webview {
+
+class BrowserViewRenderer;
+
+class AwPdfExporter : public PrintManagerDelegate {
+
joth 2013/11/21 19:38:03 spurious \n
sgurun-gerrit only 2013/11/23 01:49:11 Done.
+ public:
+ AwPdfExporter(JNIEnv* env,
+ jobject obj,
+ BrowserViewRenderer* view_renderer,
+ content::WebContents* web_contents);
+
+ virtual ~AwPdfExporter();
+
+ void ExportToPdf(JNIEnv* env,
+ jobject obj,
+ int fd,
+ jobject cancel_signal);
+
+ // Implement PrintManagerDelegate methods
+ void DidExportPdf(bool success);
+ bool IsCancelled();
joth 2013/11/21 19:38:03 virtual & OVERRIDE
sgurun-gerrit only 2013/11/23 01:49:11 Done.
+
+ private:
+ void CreatePdfSettings(JNIEnv* env, jobject obj);
+
+ JavaObjectWeakGlobalRef java_ref_;
+ BrowserViewRenderer* view_renderer_;
+ content::WebContents* web_contents_;
+
+ scoped_ptr<PrintManager> print_manager_;
+ scoped_ptr<printing::PrintSettings> print_settings_;
+
+ DISALLOW_COPY_AND_ASSIGN(AwPdfExporter);
+};
+
+bool RegisterAwPdfExporter(JNIEnv* env);
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_NATIVE_AW_PDF_EXPORTER_H_

Powered by Google App Engine
This is Rietveld 408576698