| Index: chrome/common/print_messages.h
|
| diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
|
| index 709be0eb4f035549025292d9dea9110c47e0db30..63ddae56eebeed4ec07c60899b9c7df86b6c2c63 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();
|
| + ~PrintHostMsg_SetOptionsFromDocument_Params();
|
| +
|
| + bool is_scaling_disabled;
|
| + int copies;
|
| + printing::DuplexMode duplex;
|
| + printing::PageRanges page_ranges;
|
| +};
|
| +
|
| #endif // CHROME_COMMON_PRINT_MESSAGES_H_
|
|
|
| #define IPC_MESSAGE_START PrintMsgStart
|
| @@ -166,6 +177,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 +468,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 */)
|
|
|