Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // IPC messages for printing. | 5 // IPC messages for printing. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 64 |
| 65 struct PrintHostMsg_RequestPrintPreview_Params { | 65 struct PrintHostMsg_RequestPrintPreview_Params { |
| 66 PrintHostMsg_RequestPrintPreview_Params(); | 66 PrintHostMsg_RequestPrintPreview_Params(); |
| 67 ~PrintHostMsg_RequestPrintPreview_Params(); | 67 ~PrintHostMsg_RequestPrintPreview_Params(); |
| 68 bool is_modifiable; | 68 bool is_modifiable; |
| 69 bool webnode_only; | 69 bool webnode_only; |
| 70 bool has_selection; | 70 bool has_selection; |
| 71 bool selection_only; | 71 bool selection_only; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 struct PrintHostMsg_SetOptionsFromDocument_Params { | |
| 75 PrintHostMsg_SetOptionsFromDocument_Params(); | |
| 76 ~PrintHostMsg_SetOptionsFromDocument_Params(); | |
| 77 | |
| 78 // Resets the members of the struct to 0. | |
| 79 void Reset(); | |
| 80 | |
| 81 bool print_scaling_disabled; | |
| 82 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.
| |
| 83 int print_duplex; | |
| 84 std::vector<int> print_range; | |
| 85 }; | |
| 86 | |
| 74 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ | 87 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ |
| 75 | 88 |
| 76 #define IPC_MESSAGE_START PrintMsgStart | 89 #define IPC_MESSAGE_START PrintMsgStart |
| 77 | 90 |
| 78 IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, | 91 IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, |
| 79 printing::MARGIN_TYPE_LAST) | 92 printing::MARGIN_TYPE_LAST) |
| 80 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, | 93 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, |
| 81 blink::WebPrintScalingOptionLast) | 94 blink::WebPrintScalingOptionLast) |
| 82 | 95 |
| 83 // Parameters for a render request. | 96 // Parameters for a render request. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 IPC_STRUCT_MEMBER(int, page_number) | 172 IPC_STRUCT_MEMBER(int, page_number) |
| 160 IPC_STRUCT_END() | 173 IPC_STRUCT_END() |
| 161 | 174 |
| 162 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) | 175 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) |
| 163 IPC_STRUCT_TRAITS_MEMBER(is_modifiable) | 176 IPC_STRUCT_TRAITS_MEMBER(is_modifiable) |
| 164 IPC_STRUCT_TRAITS_MEMBER(webnode_only) | 177 IPC_STRUCT_TRAITS_MEMBER(webnode_only) |
| 165 IPC_STRUCT_TRAITS_MEMBER(has_selection) | 178 IPC_STRUCT_TRAITS_MEMBER(has_selection) |
| 166 IPC_STRUCT_TRAITS_MEMBER(selection_only) | 179 IPC_STRUCT_TRAITS_MEMBER(selection_only) |
| 167 IPC_STRUCT_TRAITS_END() | 180 IPC_STRUCT_TRAITS_END() |
| 168 | 181 |
| 182 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) | |
| 183 // Specifies whether print scaling is enabled or not. | |
| 184 IPC_STRUCT_TRAITS_MEMBER(print_scaling_disabled) | |
| 185 | |
| 186 // Specifies number of copies to be printed. | |
| 187 IPC_STRUCT_TRAITS_MEMBER(print_copies) | |
| 188 | |
| 189 // Specifies paper handling option. | |
| 190 IPC_STRUCT_TRAITS_MEMBER(print_duplex) | |
| 191 | |
| 192 // Specifies page range to be printed. | |
| 193 IPC_STRUCT_TRAITS_MEMBER(print_range) | |
| 194 IPC_STRUCT_TRAITS_END() | |
| 195 | |
| 169 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) | 196 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) |
| 170 IPC_STRUCT_TRAITS_MEMBER(content_width) | 197 IPC_STRUCT_TRAITS_MEMBER(content_width) |
| 171 IPC_STRUCT_TRAITS_MEMBER(content_height) | 198 IPC_STRUCT_TRAITS_MEMBER(content_height) |
| 172 IPC_STRUCT_TRAITS_MEMBER(margin_left) | 199 IPC_STRUCT_TRAITS_MEMBER(margin_left) |
| 173 IPC_STRUCT_TRAITS_MEMBER(margin_right) | 200 IPC_STRUCT_TRAITS_MEMBER(margin_right) |
| 174 IPC_STRUCT_TRAITS_MEMBER(margin_top) | 201 IPC_STRUCT_TRAITS_MEMBER(margin_top) |
| 175 IPC_STRUCT_TRAITS_MEMBER(margin_bottom) | 202 IPC_STRUCT_TRAITS_MEMBER(margin_bottom) |
| 176 IPC_STRUCT_TRAITS_END() | 203 IPC_STRUCT_TRAITS_END() |
| 177 | 204 |
| 178 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) | 205 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 436 | 463 |
| 437 // Run a nested message loop in the renderer until print preview for | 464 // Run a nested message loop in the renderer until print preview for |
| 438 // window.print() finishes. | 465 // window.print() finishes. |
| 439 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) | 466 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) |
| 440 | 467 |
| 441 // Tell the browser to show the print preview, when the document is sufficiently | 468 // Tell the browser to show the print preview, when the document is sufficiently |
| 442 // loaded such that the renderer can determine whether it is modifiable or not. | 469 // loaded such that the renderer can determine whether it is modifiable or not. |
| 443 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 470 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
| 444 bool /* is_modifiable */) | 471 bool /* is_modifiable */) |
| 445 | 472 |
| 446 // Notify the browser that the PDF in the initiator renderer has disabled print | 473 // Notify the browser to set print presets based on source PDF document. |
| 447 // scaling option. | 474 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
| 448 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) | 475 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
| OLD | NEW |