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 30 matching lines...) Expand all Loading... |
41 bool supports_alpha_blend; | 41 bool supports_alpha_blend; |
42 int32 preview_ui_id; | 42 int32 preview_ui_id; |
43 int preview_request_id; | 43 int preview_request_id; |
44 bool is_first_request; | 44 bool is_first_request; |
45 WebKit::WebPrintScalingOption print_scaling_option; | 45 WebKit::WebPrintScalingOption print_scaling_option; |
46 bool print_to_pdf; | 46 bool print_to_pdf; |
47 bool display_header_footer; | 47 bool display_header_footer; |
48 string16 date; | 48 string16 date; |
49 string16 title; | 49 string16 title; |
50 string16 url; | 50 string16 url; |
| 51 bool should_print_backgrounds; |
51 }; | 52 }; |
52 | 53 |
53 struct PrintMsg_PrintPages_Params { | 54 struct PrintMsg_PrintPages_Params { |
54 PrintMsg_PrintPages_Params(); | 55 PrintMsg_PrintPages_Params(); |
55 ~PrintMsg_PrintPages_Params(); | 56 ~PrintMsg_PrintPages_Params(); |
56 | 57 |
57 // Resets the members of the struct to 0. | 58 // Resets the members of the struct to 0. |
58 void Reset(); | 59 void Reset(); |
59 | 60 |
60 PrintMsg_Print_Params params; | 61 PrintMsg_Print_Params params; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 IPC_STRUCT_TRAITS_MEMBER(display_header_footer) | 129 IPC_STRUCT_TRAITS_MEMBER(display_header_footer) |
129 | 130 |
130 // Date string to be printed as header if requested by the user. | 131 // Date string to be printed as header if requested by the user. |
131 IPC_STRUCT_TRAITS_MEMBER(date) | 132 IPC_STRUCT_TRAITS_MEMBER(date) |
132 | 133 |
133 // Title string to be printed as header if requested by the user. | 134 // Title string to be printed as header if requested by the user. |
134 IPC_STRUCT_TRAITS_MEMBER(title) | 135 IPC_STRUCT_TRAITS_MEMBER(title) |
135 | 136 |
136 // URL string to be printed as footer if requested by the user. | 137 // URL string to be printed as footer if requested by the user. |
137 IPC_STRUCT_TRAITS_MEMBER(url) | 138 IPC_STRUCT_TRAITS_MEMBER(url) |
| 139 |
| 140 // True if print backgrounds is requested by the user. |
| 141 IPC_STRUCT_TRAITS_MEMBER(should_print_backgrounds) |
138 IPC_STRUCT_TRAITS_END() | 142 IPC_STRUCT_TRAITS_END() |
139 | 143 |
140 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) | 144 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) |
141 // Parameters to render the page as a printed page. It must always be the same | 145 // Parameters to render the page as a printed page. It must always be the same |
142 // value for all the document. | 146 // value for all the document. |
143 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) | 147 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) |
144 | 148 |
145 // The page number is the indicator of the square that should be rendered | 149 // The page number is the indicator of the square that should be rendered |
146 // according to the layout specified in PrintMsg_Print_Params. | 150 // according to the layout specified in PrintMsg_Print_Params. |
147 IPC_STRUCT_MEMBER(int, page_number) | 151 IPC_STRUCT_MEMBER(int, page_number) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 int /* document cookie */) | 419 int /* document cookie */) |
416 | 420 |
417 // Run a nested message loop in the renderer until print preview for | 421 // Run a nested message loop in the renderer until print preview for |
418 // window.print() finishes. | 422 // window.print() finishes. |
419 IPC_SYNC_MESSAGE_ROUTED1_0(PrintHostMsg_ScriptedPrintPreview, | 423 IPC_SYNC_MESSAGE_ROUTED1_0(PrintHostMsg_ScriptedPrintPreview, |
420 bool /* is_modifiable */) | 424 bool /* is_modifiable */) |
421 | 425 |
422 // Notify the browser that the PDF in the initiator renderer has disabled print | 426 // Notify the browser that the PDF in the initiator renderer has disabled print |
423 // scaling option. | 427 // scaling option. |
424 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) | 428 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) |
OLD | NEW |