OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/values.h" | 8 #include "base/values.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Cookie for the document to ensure correctness. | 43 // Cookie for the document to ensure correctness. |
44 IPC_STRUCT_MEMBER(int, document_cookie) | 44 IPC_STRUCT_MEMBER(int, document_cookie) |
45 | 45 |
46 // Should only print currently selected text. | 46 // Should only print currently selected text. |
47 IPC_STRUCT_MEMBER(bool, selection_only) | 47 IPC_STRUCT_MEMBER(bool, selection_only) |
48 | 48 |
49 // Does the printer support alpha blending? | 49 // Does the printer support alpha blending? |
50 IPC_STRUCT_MEMBER(bool, supports_alpha_blend) | 50 IPC_STRUCT_MEMBER(bool, supports_alpha_blend) |
51 | 51 |
52 IPC_STRUCT_MEMBER(int, preview_request_id) | 52 IPC_STRUCT_MEMBER(int, preview_request_id) |
| 53 |
| 54 // Specifies if the header and footer should be printed. |
| 55 IPC_STRUCT_MEMBER(bool, display_header_footer) |
53 IPC_STRUCT_END() | 56 IPC_STRUCT_END() |
54 | 57 |
55 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) | 58 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) |
56 // Parameters to render the page as a printed page. It must always be the same | 59 // Parameters to render the page as a printed page. It must always be the same |
57 // value for all the document. | 60 // value for all the document. |
58 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) | 61 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) |
59 | 62 |
60 // The page number is the indicator of the square that should be rendered | 63 // The page number is the indicator of the square that should be rendered |
61 // according to the layout specified in PrintMsg_Print_Params. | 64 // according to the layout specified in PrintMsg_Print_Params. |
62 IPC_STRUCT_MEMBER(int, page_number) | 65 IPC_STRUCT_MEMBER(int, page_number) |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 159 |
157 // Tells the render view that printing is done so it can clean up. | 160 // Tells the render view that printing is done so it can clean up. |
158 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, | 161 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, |
159 bool /* success */) | 162 bool /* success */) |
160 | 163 |
161 // Tells the render view that preview printing request has been cancelled. | 164 // Tells the render view that preview printing request has been cancelled. |
162 IPC_MESSAGE_ROUTED0(PrintMsg_PreviewPrintingRequestCancelled) | 165 IPC_MESSAGE_ROUTED0(PrintMsg_PreviewPrintingRequestCancelled) |
163 | 166 |
164 // Tells the render view to switch the CSS to print media type, renders every | 167 // Tells the render view to switch the CSS to print media type, renders every |
165 // requested pages for print preview using the given |settings|. This gets | 168 // requested pages for print preview using the given |settings|. This gets |
166 // called multiple times as the user updates settings. | 169 // called multiple times as the user updates settings. Header Footer info |
167 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 170 // contains the strings, accessible by the browser process, to be printed in |
168 DictionaryValue /* settings */) | 171 // the header and footer. |
| 172 IPC_MESSAGE_ROUTED2(PrintMsg_PrintPreview, |
| 173 DictionaryValue /* settings */, |
| 174 DictionaryValue /* header_footer_info */) |
169 | 175 |
170 // Tells a renderer to stop blocking script initiated printing. | 176 // Tells a renderer to stop blocking script initiated printing. |
171 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) | 177 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) |
172 | 178 |
173 // Tells a renderer to continue generating the print preview. | 179 // Tells a renderer to continue generating the print preview. |
174 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview) | 180 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview) |
175 | 181 |
176 // Tells a renderer to abort the print preview and reset all state. | 182 // Tells a renderer to abort the print preview and reset all state. |
177 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) | 183 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) |
178 | 184 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 261 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, |
256 PrintHostMsg_DidPreviewDocument_Params /* params */) | 262 PrintHostMsg_DidPreviewDocument_Params /* params */) |
257 | 263 |
258 // Tell the browser printing failed. | 264 // Tell the browser printing failed. |
259 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 265 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
260 int /* document cookie */) | 266 int /* document cookie */) |
261 | 267 |
262 // Tell the browser print preview failed. | 268 // Tell the browser print preview failed. |
263 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 269 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
264 int /* document cookie */) | 270 int /* document cookie */) |
OLD | NEW |