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

Unified Diff: chrome/common/chrome_utility_printing_messages.h

Issue 2640033005: Substitute boolean GDI printing for a mode type (Closed)
Patch Set: Remove extra def in fuzzer Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
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 f1a8ad7f0fa5f82b6e1a06609fe3aaa8e0772279..b8a6209a89e3c412ad3cf1e4fd5245974a06b4d1 100644
--- a/chrome/common/chrome_utility_printing_messages.h
+++ b/chrome/common/chrome_utility_printing_messages.h
@@ -11,6 +11,7 @@
#include "build/build_config.h"
#include "components/printing/common/printing_param_traits_macros.h"
#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_param_traits.h"
#include "ipc/ipc_platform_file.h"
#include "printing/backend/print_backend.h"
#include "printing/features/features.h"
@@ -26,6 +27,21 @@
// Preview and Cloud Print messages.
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#if defined(OS_WIN)
+IPC_ENUM_TRAITS_MAX_VALUE(printing::PdfRenderSettings::Mode,
+ printing::PdfRenderSettings::Mode::GDI_TEXT)
+#else
+IPC_ENUM_TRAITS_MAX_VALUE(printing::PdfRenderSettings::Mode,
+ printing::PdfRenderSettings::Mode::NORMAL)
+#endif
+
+IPC_STRUCT_TRAITS_BEGIN(printing::PdfRenderSettings)
+ IPC_STRUCT_TRAITS_MEMBER(area)
+ IPC_STRUCT_TRAITS_MEMBER(dpi)
+ IPC_STRUCT_TRAITS_MEMBER(autorotate)
+ IPC_STRUCT_TRAITS_MEMBER(mode)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults)
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
@@ -69,7 +85,6 @@ IPC_STRUCT_TRAITS_END()
//------------------------------------------------------------------------------
// Utility process messages:
// These are messages from the browser to the utility process.
-
// Tell the utility process to render the given PDF into a PWGRaster.
IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster,
IPC::PlatformFileForTransit /* Input PDF file */,
@@ -99,10 +114,9 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults,
// 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_CONTROL3(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
IPC::PlatformFileForTransit /* input_file */,
- printing::PdfRenderSettings /* settings */,
- bool /* print_text_with_gdi */)
+ printing::PdfRenderSettings /* settings */)
// Requests conversion of the next page.
IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage,

Powered by Google App Engine
This is Rietveld 408576698