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

Side by Side Diff: chrome/common/chrome_utility_printing_messages.h

Issue 566693002: Use file handles to interact with utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Sep 17 10:40:51 PDT 2014 Created 6 years, 3 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
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/service/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Multiply-included message file, so no include guard. 5 // Multiply-included message file, so no include guard.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 IPC_STRUCT_TRAITS_BEGIN(printing::PwgRasterSettings) 54 IPC_STRUCT_TRAITS_BEGIN(printing::PwgRasterSettings)
55 IPC_STRUCT_TRAITS_MEMBER(odd_page_transform) 55 IPC_STRUCT_TRAITS_MEMBER(odd_page_transform)
56 IPC_STRUCT_TRAITS_MEMBER(rotate_all_pages) 56 IPC_STRUCT_TRAITS_MEMBER(rotate_all_pages)
57 IPC_STRUCT_TRAITS_MEMBER(reverse_page_order) 57 IPC_STRUCT_TRAITS_MEMBER(reverse_page_order)
58 IPC_STRUCT_TRAITS_END() 58 IPC_STRUCT_TRAITS_END()
59 59
60 //------------------------------------------------------------------------------ 60 //------------------------------------------------------------------------------
61 // Utility process messages: 61 // Utility process messages:
62 // These are messages from the browser to the utility process. 62 // These are messages from the browser to the utility process.
63 63
64 #if defined(OS_WIN)
65 // Tell the utility process to start rendering the given PDF into a metafile.
66 // Utility process would be alive until
67 // ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message.
68 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
69 IPC::PlatformFileForTransit, /* input_file */
70 printing::PdfRenderSettings /* settings */)
71
72 // Requests conversion of the next page.
73 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage,
74 int /* page_number */,
75 IPC::PlatformFileForTransit /* output_file */)
76
77 // Requests utility process to stop conversion and exit.
78 IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop)
79 #endif // OS_WIN
80
64 // Tell the utility process to render the given PDF into a PWGRaster. 81 // Tell the utility process to render the given PDF into a PWGRaster.
65 IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster, 82 IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster,
66 IPC::PlatformFileForTransit, /* Input PDF file */ 83 IPC::PlatformFileForTransit, /* Input PDF file */
67 printing::PdfRenderSettings, /* PDF render settings */ 84 printing::PdfRenderSettings, /* PDF render settings */
68 // PWG transform settings. 85 // PWG transform settings.
69 printing::PwgRasterSettings, 86 printing::PwgRasterSettings,
70 IPC::PlatformFileForTransit /* Output PWG file */) 87 IPC::PlatformFileForTransit /* Output PWG file */)
71 88
72 // Tells the utility process to get capabilities and defaults for the specified 89 // Tells the utility process to get capabilities and defaults for the specified
73 // printer. Used on Windows to isolate the service process from printer driver 90 // printer. Used on Windows to isolate the service process from printer driver
74 // crashes by executing this in a separate process. This does not run in a 91 // crashes by executing this in a separate process. This does not run in a
75 // sandbox. 92 // sandbox.
76 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults, 93 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults,
77 std::string /* printer name */) 94 std::string /* printer name */)
78 95
79 // Tells the utility process to get capabilities and defaults for the specified 96 // Tells the utility process to get capabilities and defaults for the specified
80 // printer. Used on Windows to isolate the service process from printer driver 97 // printer. Used on Windows to isolate the service process from printer driver
81 // crashes by executing this in a separate process. This does not run in a 98 // crashes by executing this in a separate process. This does not run in a
82 // sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults. 99 // sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults.
83 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults, 100 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults,
84 std::string /* printer name */) 101 std::string /* printer name */)
85 102
86 //------------------------------------------------------------------------------ 103 //------------------------------------------------------------------------------
87 // Utility process host messages: 104 // Utility process host messages:
88 // These are messages from the utility process to the browser. 105 // These are messages from the utility process to the browser.
89 106
107 #if defined(OS_WIN)
108 // Reply when the utility process loaded PDF. |page_count| is 0, if loading
109 // failed.
110 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount,
111 int /* page_count */)
112
113 // Reply when the utility process rendered the PDF page.
114 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone,
115 bool /* success */,
116 double /* scale_factor */)
117 #endif // OS_WIN
118
90 // Reply when the utility process has succeeded in rendering the PDF to PWG. 119 // Reply when the utility process has succeeded in rendering the PDF to PWG.
91 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded) 120 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded)
92 121
93 // Reply when an error occurred rendering the PDF to PWG. 122 // Reply when an error occurred rendering the PDF to PWG.
94 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Failed) 123 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Failed)
95 124
96 // Reply when the utility process has succeeded in obtaining the printer 125 // Reply when the utility process has succeeded in obtaining the printer
97 // capabilities and defaults. 126 // capabilities and defaults.
98 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded, 127 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
99 std::string /* printer name */, 128 std::string /* printer name */,
(...skipping 11 matching lines...) Expand all
111 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, 140 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
112 std::string /* printer name */) 141 std::string /* printer name */)
113 142
114 // Reply when the utility process has failed to obtain the printer 143 // Reply when the utility process has failed to obtain the printer
115 // semantic capabilities and defaults. 144 // semantic capabilities and defaults.
116 IPC_MESSAGE_CONTROL1( 145 IPC_MESSAGE_CONTROL1(
117 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed, 146 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed,
118 std::string /* printer name */) 147 std::string /* printer name */)
119 148
120 #endif // ENABLE_FULL_PRINTING 149 #endif // ENABLE_FULL_PRINTING
121
122 #if defined(OS_WIN)
123 // Tell the utility process to render the given PDF into a metafile.
124 // The metafile path will have ".%d" inserted where the %d is the page number.
125 // If no page range is specified, all pages will be converted.
126 IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
127 IPC::PlatformFileForTransit, // PDF file
128 base::FilePath, // Base location for output metafile
129 printing::PdfRenderSettings, // PDF render settings
130 std::vector<printing::PageRange>)
131
132 // Reply when the utility process has succeeded in rendering the PDF.
133 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_Succeeded,
134 std::vector<printing::PageRange>, // Pages rendered
135 double) // Scale factor
136
137 // Reply when an error occurred rendering the PDF.
138 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Failed)
139
140 #endif // OS_WIN
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698