Index: chrome/browser/printing/print_job.h |
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h |
index fe1c1e4d97166db11ad6898311f417c49af744d7..316c8b16fe5cfd3176c82e3b55b703314aec06dc 100644 |
--- a/chrome/browser/printing/print_job.h |
+++ b/chrome/browser/printing/print_job.h |
@@ -15,15 +15,19 @@ |
class Thread; |
+namespace base { |
+class RefCountedMemory; |
+} |
+ |
namespace printing { |
-// See definition below. |
class JobEventDetails; |
- |
+class MetafilePlayer; |
+class PdfToEmfConverter; |
+class PrintJobWorker; |
class PrintedDocument; |
class PrintedPage; |
class PrintedPagesSource; |
-class PrintJobWorker; |
class PrinterQuery; |
// Manages the print work for a specific document. Talks to the printer through |
@@ -86,6 +90,12 @@ class PrintJob : public PrintJobWorkerOwner, |
// Access the current printed document. Warning: may be NULL. |
PrintedDocument* document() const; |
+#if defined(OS_WIN) |
+ void ConvertPdfToEmf(const scoped_refptr<base::RefCountedMemory>& bytes, |
+ gfx::Size page_size, |
Lei Zhang
2014/09/15 21:49:53
nit: pass by reference?
Vitaly Buka (NO REVIEWS)
2014/09/15 22:33:50
Done.
|
+ gfx::Rect content_area); |
+#endif // OS_WIN |
+ |
protected: |
virtual ~PrintJob(); |
@@ -109,6 +119,14 @@ class PrintJob : public PrintJobWorkerOwner, |
void HoldUntilStopIsCalled(); |
+#if defined(OS_WIN) |
+ // Called on completion of converting the pdf to emf. |
+ void OnPdfPageConvertedToEmf(int page_number, |
+ double scale_factor, |
+ scoped_ptr<MetafilePlayer> emf); |
+ void OnPdfLoaded(int page_number); |
+#endif // OS_WIN |
+ |
content::NotificationRegistrar registrar_; |
// Source that generates the PrintedPage's (i.e. a WebContents). It will be |
@@ -133,6 +151,14 @@ class PrintJob : public PrintJobWorkerOwner, |
// the notified calls Cancel() again. |
bool is_canceling_; |
+#if defined(OS_WIN) |
+ scoped_ptr<PdfToEmfConverter> pdf_to_emf_converter_; |
+ int pdf_to_emf_page_count_; |
+ int pdf_to_emf_current_page_; |
+ gfx::Size pdf_to_emf_page_size_; |
+ gfx::Rect pdf_to_emf_content_area_; |
+#endif // OS_WIN |
+ |
// Used at shutdown so that we can quit a nested message loop. |
base::WeakPtrFactory<PrintJob> quit_factory_; |