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 |
11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
Vitaly Buka (NO REVIEWS)
2015/01/27 18:22:27
order
dgn
2015/01/27 18:28:17
Done.
| |
14 #include "components/printing/common/printing_param_traits_macros.h" | |
14 #include "printing/page_range.h" | 15 #include "printing/page_range.h" |
15 #include "printing/page_size_margins.h" | 16 #include "printing/page_size_margins.h" |
16 #include "printing/print_job_constants.h" | 17 #include "printing/print_job_constants.h" |
17 #include "third_party/WebKit/public/web/WebPrintScalingOption.h" | 18 #include "third_party/WebKit/public/web/WebPrintScalingOption.h" |
18 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
19 #include "ui/gfx/ipc/gfx_param_traits.h" | 20 #include "ui/gfx/ipc/gfx_param_traits.h" |
20 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
21 | 22 |
23 // Force multiple inclusion of the param traits file to generate all methods. | |
24 #undef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | |
25 | |
22 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 26 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
23 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 27 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
24 | 28 |
25 struct PrintMsg_Print_Params { | 29 struct PrintMsg_Print_Params { |
26 PrintMsg_Print_Params(); | 30 PrintMsg_Print_Params(); |
27 ~PrintMsg_Print_Params(); | 31 ~PrintMsg_Print_Params(); |
28 | 32 |
29 // Resets the members of the struct to 0. | 33 // Resets the members of the struct to 0. |
30 void Reset(); | 34 void Reset(); |
31 | 35 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 bool is_scaling_disabled; | 83 bool is_scaling_disabled; |
80 int copies; | 84 int copies; |
81 printing::DuplexMode duplex; | 85 printing::DuplexMode duplex; |
82 printing::PageRanges page_ranges; | 86 printing::PageRanges page_ranges; |
83 }; | 87 }; |
84 | 88 |
85 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 89 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
86 | 90 |
87 #define IPC_MESSAGE_START PrintMsgStart | 91 #define IPC_MESSAGE_START PrintMsgStart |
88 | 92 |
89 IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, | |
90 printing::MARGIN_TYPE_LAST) | |
91 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, | 93 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, |
92 blink::WebPrintScalingOptionLast) | 94 blink::WebPrintScalingOptionLast) |
93 IPC_ENUM_TRAITS_MIN_MAX_VALUE(printing::DuplexMode, | |
94 printing::UNKNOWN_DUPLEX_MODE, | |
95 printing::SHORT_EDGE) | |
96 | 95 |
97 // Parameters for a render request. | 96 // Parameters for a render request. |
98 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) | 97 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) |
99 // Physical size of the page, including non-printable margins, | 98 // Physical size of the page, including non-printable margins, |
100 // in pixels according to dpi. | 99 // in pixels according to dpi. |
101 IPC_STRUCT_TRAITS_MEMBER(page_size) | 100 IPC_STRUCT_TRAITS_MEMBER(page_size) |
102 | 101 |
103 // In pixels according to dpi_x and dpi_y. | 102 // In pixels according to dpi_x and dpi_y. |
104 IPC_STRUCT_TRAITS_MEMBER(content_size) | 103 IPC_STRUCT_TRAITS_MEMBER(content_size) |
105 | 104 |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
470 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) | 469 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) |
471 | 470 |
472 // Tell the browser to show the print preview, when the document is sufficiently | 471 // Tell the browser to show the print preview, when the document is sufficiently |
473 // loaded such that the renderer can determine whether it is modifiable or not. | 472 // loaded such that the renderer can determine whether it is modifiable or not. |
474 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 473 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
475 bool /* is_modifiable */) | 474 bool /* is_modifiable */) |
476 | 475 |
477 // Notify the browser to set print presets based on source PDF document. | 476 // Notify the browser to set print presets based on source PDF document. |
478 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 477 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
479 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 478 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
OLD | NEW |