Chromium Code Reviews| Index: chrome/common/print_messages.h |
| diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h |
| index 709be0eb4f035549025292d9dea9110c47e0db30..b169f4a4e4ba5bcfa7fe5d2cafe0854568d70ed5 100644 |
| --- a/chrome/common/print_messages.h |
| +++ b/chrome/common/print_messages.h |
| @@ -11,6 +11,7 @@ |
| #include "base/memory/shared_memory.h" |
| #include "base/values.h" |
| #include "ipc/ipc_message_macros.h" |
| +#include "printing/page_range.h" |
| #include "printing/page_size_margins.h" |
| #include "printing/print_job_constants.h" |
| #include "third_party/WebKit/public/web/WebPrintScalingOption.h" |
| @@ -71,6 +72,16 @@ struct PrintHostMsg_RequestPrintPreview_Params { |
| bool selection_only; |
| }; |
| +struct PrintHostMsg_SetOptionsFromDocument_Params { |
| + PrintHostMsg_SetOptionsFromDocument_Params(); |
|
jochen (gone - plz use gerrit)
2014/07/16 08:53:37
can you make the ctor and dtor inline please?
Nikhil
2014/07/16 09:26:57
I followed style currently followed in the file. B
|
| + ~PrintHostMsg_SetOptionsFromDocument_Params(); |
| + |
| + bool is_scaling_disabled; |
| + int copies; |
| + printing::DuplexMode duplex; |
| + printing::PageRanges page_ranges; |
|
jochen (gone - plz use gerrit)
2014/07/16 08:53:37
why is page_ranges not initialized by your ctor?
Nikhil
2014/07/16 09:26:57
Based on review comment on patchset 1 (line 88).
|
| +}; |
| + |
| #endif // CHROME_COMMON_PRINT_MESSAGES_H_ |
| #define IPC_MESSAGE_START PrintMsgStart |
| @@ -79,6 +90,8 @@ IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, |
| printing::MARGIN_TYPE_LAST) |
| IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, |
| blink::WebPrintScalingOptionLast) |
| +IPC_ENUM_TRAITS_MAX_VALUE(printing::DuplexMode, |
| + printing::DUPLEX_MODE_LAST) |
| // Parameters for a render request. |
| IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) |
| @@ -166,6 +179,20 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) |
| IPC_STRUCT_TRAITS_MEMBER(selection_only) |
| IPC_STRUCT_TRAITS_END() |
| +IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) |
| + // Specifies whether print scaling is enabled or not. |
| + IPC_STRUCT_TRAITS_MEMBER(is_scaling_disabled) |
| + |
| + // Specifies number of copies to be printed. |
| + IPC_STRUCT_TRAITS_MEMBER(copies) |
| + |
| + // Specifies paper handling option. |
| + IPC_STRUCT_TRAITS_MEMBER(duplex) |
| + |
| + // Specifies page range to be printed. |
| + IPC_STRUCT_TRAITS_MEMBER(page_ranges) |
| +IPC_STRUCT_TRAITS_END() |
| + |
| IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) |
| IPC_STRUCT_TRAITS_MEMBER(content_width) |
| IPC_STRUCT_TRAITS_MEMBER(content_height) |
| @@ -443,6 +470,6 @@ IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) |
| IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
| bool /* is_modifiable */) |
| -// Notify the browser that the PDF in the initiator renderer has disabled print |
| -// scaling option. |
| -IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) |
| +// Notify the browser to set print presets based on source PDF document. |
| +IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
| + PrintHostMsg_SetOptionsFromDocument_Params /* params */) |