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

Unified Diff: chrome/common/print_messages.h

Issue 388783003: Add support to send print preset options in one message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/print_messages.h
diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
index 709be0eb4f035549025292d9dea9110c47e0db30..287be80b35fcf73886b8c74e24e163763b068ef0 100644
--- a/chrome/common/print_messages.h
+++ b/chrome/common/print_messages.h
@@ -71,6 +71,19 @@ struct PrintHostMsg_RequestPrintPreview_Params {
bool selection_only;
};
+struct PrintHostMsg_SetOptionsFromDocument_Params {
+ PrintHostMsg_SetOptionsFromDocument_Params();
+ ~PrintHostMsg_SetOptionsFromDocument_Params();
+
+ // Resets the members of the struct to 0.
+ void Reset();
+
+ bool print_scaling_disabled;
+ int print_copies;
Vitaly Buka (NO REVIEWS) 2014/07/11 19:28:37 bool is_scaling_disabled; int copies; printing::Du
Nikhil 2014/07/14 08:58:08 Done.
+ int print_duplex;
+ std::vector<int> print_range;
+};
+
#endif // CHROME_COMMON_PRINT_MESSAGES_H_
#define IPC_MESSAGE_START PrintMsgStart
@@ -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(print_scaling_disabled)
+
+ // Specifies number of copies to be printed.
+ IPC_STRUCT_TRAITS_MEMBER(print_copies)
+
+ // Specifies paper handling option.
+ IPC_STRUCT_TRAITS_MEMBER(print_duplex)
+
+ // Specifies page range to be printed.
+ IPC_STRUCT_TRAITS_MEMBER(print_range)
+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 */)

Powered by Google App Engine
This is Rietveld 408576698