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

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

Issue 799643004: Combine PDF plugin into the Chromium binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "chrome/utility/utility_message_handler.h" 10 #include "chrome/utility/utility_message_handler.h"
11 #include "ipc/ipc_platform_file.h" 11 #include "ipc/ipc_platform_file.h"
12 #include "printing/pdf_render_settings.h" 12 #include "printing/pdf_render_settings.h"
13 13
14 #if !defined(ENABLE_PRINT_PREVIEW) && !defined(OS_WIN) 14 #if !defined(ENABLE_PRINT_PREVIEW) && !defined(OS_WIN)
15 #error "Windows or full printing must be enabled" 15 #error "Windows or full printing must be enabled"
16 #endif 16 #endif
17 17
18 namespace printing { 18 namespace printing {
19 class PdfRenderSettings; 19 class PdfRenderSettings;
20 struct PwgRasterSettings; 20 struct PwgRasterSettings;
21 struct PageRange; 21 struct PageRange;
22 } 22 }
23 23
24 // Dispatches IPCs for printing. 24 // Dispatches IPCs for printing.
25 class PrintingHandler : public UtilityMessageHandler { 25 class PrintingHandler : public UtilityMessageHandler {
26 public: 26 public:
27 PrintingHandler(); 27 PrintingHandler();
28 ~PrintingHandler() override; 28 ~PrintingHandler() override;
29 29
30 static void PreSandboxStartup();
31
32 // IPC::Listener: 30 // IPC::Listener:
33 bool OnMessageReceived(const IPC::Message& message) override; 31 bool OnMessageReceived(const IPC::Message& message) override;
34 32
35 private: 33 private:
36 // IPC message handlers. 34 // IPC message handlers.
37 #if defined(OS_WIN) 35 #if defined(OS_WIN)
38 void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit, 36 void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit,
39 const printing::PdfRenderSettings& settings); 37 const printing::PdfRenderSettings& settings);
40 void OnRenderPDFPagesToMetafileGetPage( 38 void OnRenderPDFPagesToMetafileGetPage(
41 int page_number, 39 int page_number,
(...skipping 27 matching lines...) Expand all
69 67
70 #if defined(OS_WIN) 68 #if defined(OS_WIN)
71 std::vector<char> pdf_data_; 69 std::vector<char> pdf_data_;
72 printing::PdfRenderSettings pdf_rendering_settings_; 70 printing::PdfRenderSettings pdf_rendering_settings_;
73 #endif 71 #endif
74 72
75 DISALLOW_COPY_AND_ASSIGN(PrintingHandler); 73 DISALLOW_COPY_AND_ASSIGN(PrintingHandler);
76 }; 74 };
77 75
78 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_ 76 #endif // CHROME_UTILITY_PRINTING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698