Index: components/printing/common/print_messages.h |
diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h |
index f807e75a1e5c01963d650b7233999c8342257a9c..001f44a98a76a4b2319596daf3c39f96d9ffd112 100644 |
--- a/components/printing/common/print_messages.h |
+++ b/components/printing/common/print_messages.h |
@@ -15,6 +15,7 @@ |
#include "build/build_config.h" |
#include "components/printing/common/printing_param_traits_macros.h" |
#include "ipc/ipc_message_macros.h" |
+#include "printing/features/features.h" |
#include "printing/page_range.h" |
#include "printing/page_size_margins.h" |
#include "printing/print_job_constants.h" |
@@ -72,7 +73,7 @@ struct PrintMsg_PrintPages_Params { |
std::vector<int> pages; |
}; |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
struct PrintHostMsg_RequestPrintPreview_Params { |
PrintHostMsg_RequestPrintPreview_Params(); |
~PrintHostMsg_RequestPrintPreview_Params(); |
@@ -91,7 +92,7 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { |
printing::DuplexMode duplex; |
printing::PageRanges page_ranges; |
}; |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
@@ -181,7 +182,7 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) |
IPC_STRUCT_TRAITS_MEMBER(to) |
IPC_STRUCT_TRAITS_END() |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) |
IPC_STRUCT_TRAITS_MEMBER(is_modifiable) |
IPC_STRUCT_TRAITS_MEMBER(webnode_only) |
@@ -202,7 +203,7 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) |
// Specifies page range to be printed. |
IPC_STRUCT_TRAITS_MEMBER(page_ranges) |
IPC_STRUCT_TRAITS_END() |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) |
IPC_STRUCT_TRAITS_MEMBER(content_width) |
@@ -222,7 +223,7 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) |
IPC_STRUCT_TRAITS_MEMBER(pages) |
IPC_STRUCT_TRAITS_END() |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Parameters to describe a rendered document. |
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) |
// A shared memory handle to metafile data. |
@@ -279,7 +280,7 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) |
// Indicates whether the existing preview data needs to be cleared or not. |
IPC_STRUCT_MEMBER(bool, clear_preview_data) |
IPC_STRUCT_END() |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Parameters to describe a rendered page. |
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) |
@@ -318,31 +319,31 @@ IPC_STRUCT_END() |
// Messages sent from the browser to the renderer. |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Tells the render view to initiate print preview for the entire document. |
IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Tells the render frame to initiate printing or print preview for a particular |
// node, depending on which mode the render frame is in. |
IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) |
-#if defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Tells the renderer to print the print preview tab's PDF plugin without |
// showing the print dialog. (This is the final step in the print preview |
// workflow.) |
IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, |
base::DictionaryValue /* settings */) |
-#endif // defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) |
-#if defined(ENABLE_BASIC_PRINTING) |
+#if BUILDFLAG(ENABLE_BASIC_PRINTING) |
// Tells the render view to switch the CSS to print media type, renders every |
// requested pages and switch back the CSS to display media type. |
IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) |
// Like PrintMsg_PrintPages, but using the print preview document's frame/node. |
IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) |
-#endif // defined(ENABLE_BASIC_PRINTING) |
+#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) |
// Tells the render view that printing is done so it can clean up. |
IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, |
@@ -352,13 +353,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, |
IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked, |
bool /* blocked */) |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Tells the render view to switch the CSS to print media type, renders every |
// requested pages for print preview using the given |settings|. This gets |
// called multiple times as the user updates settings. |
IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
base::DictionaryValue /* settings */) |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Messages sent from the renderer to the browser. |
@@ -418,7 +419,7 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, |
int /* fd in browser */) // Used only by Chrome OS. |
#endif // defined(OS_ANDROID) |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Asks the browser to do print preview. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, |
PrintHostMsg_RequestPrintPreview_Params /* params */) |
@@ -452,7 +453,7 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, |
// The memory handle in this message is already valid in the browser process. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, |
PrintHostMsg_DidPreviewDocument_Params /* params */) |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// This is sent when there are invalid printer settings. |
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) |
@@ -461,7 +462,7 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) |
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
int /* document cookie */) |
-#if defined(ENABLE_PRINT_PREVIEW) |
+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
// Tell the browser print preview failed. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
int /* document cookie */) |
@@ -488,4 +489,4 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
// Notify the browser to set print presets based on source PDF document. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
-#endif // defined(ENABLE_PRINT_PREVIEW) |
+#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |