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

Side by Side Diff: chrome/utility/printing_handler.h

Issue 2633573002: Add Postscript Printing (Closed)
Patch Set: Fix clang compile Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_UTILITY_PRINTING_HANDLER_H_ 5 #ifndef CHROME_UTILITY_PRINTING_HANDLER_H_
6 #define CHROME_UTILITY_PRINTING_HANDLER_H_ 6 #define CHROME_UTILITY_PRINTING_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 22 matching lines...) Expand all
33 33
34 private: 34 private:
35 // IPC message handlers. 35 // IPC message handlers.
36 #if defined(OS_WIN) 36 #if defined(OS_WIN)
37 void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit, 37 void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit,
38 const PdfRenderSettings& settings); 38 const PdfRenderSettings& settings);
39 void OnRenderPDFPagesToMetafileGetPage( 39 void OnRenderPDFPagesToMetafileGetPage(
40 int page_number, 40 int page_number,
41 IPC::PlatformFileForTransit output_file); 41 IPC::PlatformFileForTransit output_file);
42 void OnRenderPDFPagesToMetafileStop(); 42 void OnRenderPDFPagesToMetafileStop();
43 void OnRenderPDFPagesToPostScriptStart(
44 IPC::PlatformFileForTransit pdf_transit,
45 const PdfRenderSettings& settings);
46 void OnRenderPDFPagesToPostScriptGetPage(
47 int page_number,
48 IPC::PlatformFileForTransit output_file);
49 void OnRenderPDFPagesToPostScriptStop();
43 #endif // OS_WIN 50 #endif // OS_WIN
44 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 51 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
45 void OnRenderPDFPagesToPWGRaster(IPC::PlatformFileForTransit pdf_transit, 52 void OnRenderPDFPagesToPWGRaster(IPC::PlatformFileForTransit pdf_transit,
46 const PdfRenderSettings& settings, 53 const PdfRenderSettings& settings,
47 const PwgRasterSettings& bitmap_settings, 54 const PwgRasterSettings& bitmap_settings,
48 IPC::PlatformFileForTransit bitmap_transit); 55 IPC::PlatformFileForTransit bitmap_transit);
49 #endif // ENABLE_PRINT_PREVIEW 56 #endif // ENABLE_PRINT_PREVIEW
50 57
51 #if defined(OS_WIN) 58 #if defined(OS_WIN)
52 int LoadPDF(base::File pdf_file); 59 int LoadPDF(base::File pdf_file);
53 bool RenderPdfPageToMetafile(int page_number, 60 bool RenderPdfPageToMetafile(int page_number,
54 base::File output_file, 61 base::File output_file,
55 float* scale_factor); 62 float* scale_factor);
63 bool RenderPdfPageToPostScript(int page_number, base::File output_file);
56 #endif // OS_WIN 64 #endif // OS_WIN
57 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 65 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
58 bool RenderPDFPagesToPWGRaster(base::File pdf_file, 66 bool RenderPDFPagesToPWGRaster(base::File pdf_file,
59 const PdfRenderSettings& settings, 67 const PdfRenderSettings& settings,
60 const PwgRasterSettings& bitmap_settings, 68 const PwgRasterSettings& bitmap_settings,
61 base::File bitmap_file); 69 base::File bitmap_file);
62 70
63 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); 71 void OnGetPrinterCapsAndDefaults(const std::string& printer_name);
64 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); 72 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name);
65 #endif // ENABLE_PRINT_PREVIEW 73 #endif // ENABLE_PRINT_PREVIEW
66 74
67 #if defined(OS_WIN) 75 #if defined(OS_WIN)
68 std::vector<char> pdf_data_; 76 std::vector<char> pdf_data_;
69 PdfRenderSettings pdf_rendering_settings_; 77 PdfRenderSettings pdf_rendering_settings_;
70 #endif 78 #endif
71 79
72 DISALLOW_COPY_AND_ASSIGN(PrintingHandler); 80 DISALLOW_COPY_AND_ASSIGN(PrintingHandler);
73 }; 81 };
74 82
75 } // namespace printing 83 } // namespace printing
76 84
77 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_ 85 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698