Index: chrome/utility/printing_handler.h |
diff --git a/chrome/utility/printing_handler.h b/chrome/utility/printing_handler.h |
index d0135f5b2ba84f7be5e34ec46b654aef0854cd6c..db0194d51f8d6035427ae790202d2c8b6be40068 100644 |
--- a/chrome/utility/printing_handler.h |
+++ b/chrome/utility/printing_handler.h |
@@ -9,6 +9,7 @@ |
#include "base/macros.h" |
#include "chrome/utility/utility_message_handler.h" |
#include "ipc/ipc_platform_file.h" |
+#include "printing/pdf_render_settings.h" |
#if !defined(ENABLE_FULL_PRINTING) && !defined(OS_WIN) |
#error "Windows or full printing must be enabled" |
@@ -34,11 +35,12 @@ class PrintingHandler : public UtilityMessageHandler { |
private: |
// IPC message handlers. |
#if defined(OS_WIN) |
- void OnRenderPDFPagesToMetafile( |
- IPC::PlatformFileForTransit pdf_transit, |
- const base::FilePath& metafile_path, |
- const printing::PdfRenderSettings& settings, |
- const std::vector<printing::PageRange>& page_ranges); |
+ void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit, |
+ const printing::PdfRenderSettings& settings); |
+ void OnRenderPDFPagesToMetafileGetPage( |
+ int page_number, |
+ IPC::PlatformFileForTransit output_file); |
+ void OnRenderPDFPagesToMetafileStop(); |
#endif // OS_WIN |
#if defined(ENABLE_FULL_PRINTING) |
void OnRenderPDFPagesToPWGRaster( |
@@ -49,18 +51,10 @@ class PrintingHandler : public UtilityMessageHandler { |
#endif // ENABLE_FULL_PRINTING |
#if defined(OS_WIN) |
- // Helper method for Windows. |
- // |highest_rendered_page_number| is set to -1 on failure to render any page. |
- // |page_ranges| is both input and output. If supplied as input, only the |
- // specified pages will be rendered. If an empty vector is supplied it will |
- // be filled with a range of all pages that were rendered. |
- bool RenderPDFToWinMetafile( |
- base::File pdf_file, |
- const base::FilePath& metafile_path, |
- const printing::PdfRenderSettings& settings, |
- std::vector<printing::PageRange>* page_ranges, |
- int* highest_rendered_page_number, |
- double* scale_factor); |
+ int LoadPDF(base::File pdf_file); |
+ bool RenderPdfPageToMetafile(int page_number, |
+ base::File output_file, |
+ double* scale_factor); |
#endif // OS_WIN |
#if defined(ENABLE_FULL_PRINTING) |
bool RenderPDFPagesToPWGRaster( |
@@ -73,6 +67,11 @@ class PrintingHandler : public UtilityMessageHandler { |
void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); |
#endif // ENABLE_FULL_PRINTING |
+#if defined(OS_WIN) |
+ std::vector<char> pdf_data_; |
+ printing::PdfRenderSettings pdf_rendering_settings_; |
+#endif |
+ |
DISALLOW_COPY_AND_ASSIGN(PrintingHandler); |
}; |