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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params) | 100 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params) |
101 // A shared memory handle to metafile data for a draft document of the page. | 101 // A shared memory handle to metafile data for a draft document of the page. |
102 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) | 102 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
103 | 103 |
104 // Size of metafile data. | 104 // Size of metafile data. |
105 IPC_STRUCT_MEMBER(uint32, data_size) | 105 IPC_STRUCT_MEMBER(uint32, data_size) |
106 | 106 |
107 // |page_number| is zero-based and can be |printing::INVALID_PAGE_INDEX| if it | 107 // |page_number| is zero-based and can be |printing::INVALID_PAGE_INDEX| if it |
108 // is just a check. | 108 // is just a check. |
109 IPC_STRUCT_MEMBER(int, page_number) | 109 IPC_STRUCT_MEMBER(int, page_number) |
| 110 |
| 111 // The id of the preview request. |
| 112 IPC_STRUCT_MEMBER(int, preview_request_id) |
110 IPC_STRUCT_END() | 113 IPC_STRUCT_END() |
111 | 114 |
112 // Parameters to describe a rendered page. | 115 // Parameters to describe a rendered page. |
113 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) | 116 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) |
114 // A shared memory handle to the EMF data. This data can be quite large so a | 117 // A shared memory handle to the EMF data. This data can be quite large so a |
115 // memory map needs to be used. | 118 // memory map needs to be used. |
116 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) | 119 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
117 | 120 |
118 // Size of the metafile data. | 121 // Size of the metafile data. |
119 IPC_STRUCT_MEMBER(uint32, data_size) | 122 IPC_STRUCT_MEMBER(uint32, data_size) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 base::FileDescriptor /* temp file fd */, | 255 base::FileDescriptor /* temp file fd */, |
253 int /* fd in browser*/) | 256 int /* fd in browser*/) |
254 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, | 257 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, |
255 int /* fd in browser */) | 258 int /* fd in browser */) |
256 #endif | 259 #endif |
257 | 260 |
258 // Asks the browser to do print preview. | 261 // Asks the browser to do print preview. |
259 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) | 262 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) |
260 | 263 |
261 // Notify the browser the number of pages in the print preview document. | 264 // Notify the browser the number of pages in the print preview document. |
262 IPC_MESSAGE_ROUTED3(PrintHostMsg_DidGetPreviewPageCount, | 265 IPC_MESSAGE_ROUTED4(PrintHostMsg_DidGetPreviewPageCount, |
263 int /* document cookie */, | 266 int /* document cookie */, |
264 int /* page count */, | 267 int /* page count */, |
265 bool /* is modifiable */) | 268 bool /* is modifiable */, |
| 269 int /* preview_request_id*/) |
266 | 270 |
267 // Notify the browser a print preview page has been rendered. | 271 // Notify the browser a print preview page has been rendered. |
268 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, | 272 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
269 PrintHostMsg_DidPreviewPage_Params /* params */) | 273 PrintHostMsg_DidPreviewPage_Params /* params */) |
270 | 274 |
271 // Sends back to the browser the complete rendered document for print preview | 275 // Sends back to the browser the complete rendered document for print preview |
272 // that was requested by a PrintMsg_PrintPreview message. The memory handle in | 276 // that was requested by a PrintMsg_PrintPreview message. The memory handle in |
273 // this message is already valid in the browser process. | 277 // this message is already valid in the browser process. |
274 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 278 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, |
275 PrintHostMsg_DidPreviewDocument_Params /* params */) | 279 PrintHostMsg_DidPreviewDocument_Params /* params */) |
276 | 280 |
277 // Tell the browser printing failed. | 281 // Tell the browser printing failed. |
278 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 282 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
279 int /* document cookie */) | 283 int /* document cookie */) |
280 | 284 |
281 // Tell the browser print preview failed. | 285 // Tell the browser print preview failed. |
282 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 286 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
283 int /* document cookie */) | 287 int /* document cookie */) |
OLD | NEW |