OLD | NEW |
---|---|
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 17 matching lines...) Expand all Loading... | |
28 PrintingHandler(); | 28 PrintingHandler(); |
29 ~PrintingHandler() override; | 29 ~PrintingHandler() override; |
30 | 30 |
31 // IPC::Listener: | 31 // IPC::Listener: |
32 bool OnMessageReceived(const IPC::Message& message) override; | 32 bool OnMessageReceived(const IPC::Message& message) override; |
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 bool print_text_with_gdi); | |
40 void OnRenderPDFPagesToMetafileGetPage( | 39 void OnRenderPDFPagesToMetafileGetPage( |
41 int page_number, | 40 int page_number, |
42 IPC::PlatformFileForTransit output_file); | 41 IPC::PlatformFileForTransit output_file); |
43 void OnRenderPDFPagesToMetafileStop(); | 42 void OnRenderPDFPagesToMetafileStop(); |
44 #endif // OS_WIN | 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(); | |
50 #endif | |
45 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 51 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
46 void OnRenderPDFPagesToPWGRaster(IPC::PlatformFileForTransit pdf_transit, | 52 void OnRenderPDFPagesToPWGRaster(IPC::PlatformFileForTransit pdf_transit, |
47 const PdfRenderSettings& settings, | 53 const PdfRenderSettings& settings, |
48 const PwgRasterSettings& bitmap_settings, | 54 const PwgRasterSettings& bitmap_settings, |
49 IPC::PlatformFileForTransit bitmap_transit); | 55 IPC::PlatformFileForTransit bitmap_transit); |
50 #endif // ENABLE_PRINT_PREVIEW | 56 #endif |
dsinclair
2017/01/17 17:10:00
Why remove the comments?
| |
51 | 57 |
52 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
53 int LoadPDF(base::File pdf_file); | 59 int LoadPDF(base::File pdf_file); |
54 bool RenderPdfPageToMetafile(int page_number, | 60 bool RenderPdfPageToMetafile(int page_number, |
55 base::File output_file, | 61 base::File output_file, |
56 float* scale_factor); | 62 float* scale_factor); |
57 #endif // OS_WIN | 63 bool RenderPdfPageToPostScript(int page_number, base::File output_file); |
64 #endif | |
58 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 65 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
59 bool RenderPDFPagesToPWGRaster(base::File pdf_file, | 66 bool RenderPDFPagesToPWGRaster(base::File pdf_file, |
60 const PdfRenderSettings& settings, | 67 const PdfRenderSettings& settings, |
61 const PwgRasterSettings& bitmap_settings, | 68 const PwgRasterSettings& bitmap_settings, |
62 base::File bitmap_file); | 69 base::File bitmap_file); |
63 | 70 |
64 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 71 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
65 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); | 72 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); |
66 #endif // ENABLE_PRINT_PREVIEW | 73 #endif |
67 | 74 |
68 #if defined(OS_WIN) | 75 #if defined(OS_WIN) |
69 std::vector<char> pdf_data_; | 76 std::vector<char> pdf_data_; |
70 PdfRenderSettings pdf_rendering_settings_; | 77 PdfRenderSettings pdf_rendering_settings_; |
71 #endif | 78 #endif |
72 | 79 |
73 DISALLOW_COPY_AND_ASSIGN(PrintingHandler); | 80 DISALLOW_COPY_AND_ASSIGN(PrintingHandler); |
74 }; | 81 }; |
75 | 82 |
76 } // namespace printing | 83 } // namespace printing |
77 | 84 |
78 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_ | 85 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_ |
OLD | NEW |