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

Unified Diff: chrome/browser/printing/print_view_manager_basic.h

Issue 23116003: Adds PrintingContext implementation stub for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses code review issues. Solves infinite recursion bug. Improves the interface between Java an… Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/print_view_manager_basic.h
diff --git a/chrome/browser/printing/print_view_manager_basic.h b/chrome/browser/printing/print_view_manager_basic.h
index be1bc66bc07fc8a28dbbb249af90aeb0187feda3..105a2131e25a7c47ea5f17a6188f756ce70fc27a 100644
--- a/chrome/browser/printing/print_view_manager_basic.h
+++ b/chrome/browser/printing/print_view_manager_basic.h
@@ -8,6 +8,10 @@
#include "chrome/browser/printing/print_view_manager_base.h"
#include "content/public/browser/web_contents_user_data.h"
+#if defined(OS_ANDROID)
+#include "base/file_descriptor_posix.h"
+#endif
+
namespace printing {
// Manages the print commands for a WebContents - basic version.
@@ -17,10 +21,34 @@ class PrintViewManagerBasic
public:
virtual ~PrintViewManagerBasic();
+#if defined(OS_ANDROID)
+ // Sets the file descriptor into which the PDF will be written.
+ void set_file_descriptor(const base::FileDescriptor& file_descriptor) {
+ file_descriptor_ = file_descriptor;
+ }
+
+ // Gets the file descriptor into which the PDF will be written.
+ base::FileDescriptor get_file_descriptor() const { return file_descriptor_; }
whywhat 2013/08/16 23:31:36 nit: s/get_file_descriptor/file_descriptor
cimamoglu1 2013/08/19 13:47:26 Done.
+
+ // content::WebContentsObserver implementation.
+ // Terminates or cancels the print job if one was pending.
+ virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
+
+ // content::WebContentsObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+#endif
+
private:
explicit PrintViewManagerBasic(content::WebContents* web_contents);
friend class content::WebContentsUserData<PrintViewManagerBasic>;
+#if defined(OS_ANDROID)
+ virtual void OnPrintingFailed(int cookie);
Lei Zhang 2013/08/18 09:56:26 OVERRIDE
cimamoglu1 2013/08/19 13:47:26 Done.
+
+ // The file descriptor into which the PDF of the page will be written.
+ base::FileDescriptor file_descriptor_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBasic);
};

Powered by Google App Engine
This is Rietveld 408576698