Chromium Code Reviews| Index: chrome/common/chrome_utility_printing_messages.h |
| diff --git a/chrome/common/chrome_utility_printing_messages.h b/chrome/common/chrome_utility_printing_messages.h |
| index d5ddd6e142627567380248e302eafba80428311e..7d902875b5a67b93ee2ace38b90b1a5f86cc05c7 100644 |
| --- a/chrome/common/chrome_utility_printing_messages.h |
| +++ b/chrome/common/chrome_utility_printing_messages.h |
| @@ -16,8 +16,8 @@ |
| #define IPC_MESSAGE_START ChromeUtilityPrintingMsgStart |
| +// Preview and Cloud Print messages. |
| #if defined(ENABLE_FULL_PRINTING) |
| - |
| IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults) |
| IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) |
| IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) |
| @@ -61,23 +61,6 @@ IPC_STRUCT_TRAITS_END() |
| // Utility process messages: |
| // These are messages from the browser to the utility process. |
| -#if defined(OS_WIN) |
| -// Tell the utility process to start rendering the given PDF into a metafile. |
| -// Utility process would be alive until |
| -// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message. |
| -IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles, |
| - IPC::PlatformFileForTransit, /* input_file */ |
| - printing::PdfRenderSettings /* settings */) |
| - |
| -// Requests conversion of the next page. |
| -IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage, |
| - int /* page_number */, |
| - IPC::PlatformFileForTransit /* output_file */) |
| - |
| -// Requests utility process to stop conversion and exit. |
| -IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop) |
| -#endif // OS_WIN |
| - |
| // Tell the utility process to render the given PDF into a PWGRaster. |
| IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster, |
| IPC::PlatformFileForTransit, /* Input PDF file */ |
| @@ -99,23 +82,32 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults, |
| // sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults. |
| IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults, |
| std::string /* printer name */) |
| +#endif // ENABLE_FULL_PRINTING |
| + |
| +// Windows uses messages for printing even without preview. crbug.com/170859 |
| +// Primary user of Windows without preview is CEF. crbug.com/417967 |
| +#if defined(ENABLE_PRINTING) && defined(OS_WIN) |
|
raymes
2014/09/29 00:09:37
Do we really need the check for OS_WIN here too? I
Vitaly Buka (NO REVIEWS)
2014/09/29 17:08:07
There are 3 files that refers to these messages
p
|
| +// Tell the utility process to start rendering the given PDF into a metafile. |
| +// Utility process would be alive until |
| +// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message. |
| +IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles, |
| + IPC::PlatformFileForTransit, /* input_file */ |
| + printing::PdfRenderSettings /* settings */) |
| + |
| +// Requests conversion of the next page. |
| +IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage, |
| + int /* page_number */, |
| + IPC::PlatformFileForTransit /* output_file */) |
| + |
| +// Requests utility process to stop conversion and exit. |
| +IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop) |
| +#endif // ENABLE_PRINTING && OS_WIN |
| //------------------------------------------------------------------------------ |
| // Utility process host messages: |
| // These are messages from the utility process to the browser. |
| -#if defined(OS_WIN) |
| -// Reply when the utility process loaded PDF. |page_count| is 0, if loading |
| -// failed. |
| -IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount, |
| - int /* page_count */) |
| - |
| -// Reply when the utility process rendered the PDF page. |
| -IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone, |
| - bool /* success */, |
| - double /* scale_factor */) |
| -#endif // OS_WIN |
| - |
| +#if defined(ENABLE_FULL_PRINTING) |
| // Reply when the utility process has succeeded in rendering the PDF to PWG. |
| IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded) |
| @@ -145,5 +137,16 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, |
| IPC_MESSAGE_CONTROL1( |
| ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed, |
| std::string /* printer name */) |
| - |
| #endif // ENABLE_FULL_PRINTING |
| + |
| +#if defined(ENABLE_PRINTING) && defined(OS_WIN) |
| +// Reply when the utility process loaded PDF. |page_count| is 0, if loading |
| +// failed. |
| +IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount, |
| + int /* page_count */) |
| + |
| +// Reply when the utility process rendered the PDF page. |
| +IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone, |
| + bool /* success */, |
| + double /* scale_factor */) |
| +#endif // ENABLE_PRINTING && OS_WIN |