| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 IPC_STRUCT_MEMBER(int, document_cookie) | 122 IPC_STRUCT_MEMBER(int, document_cookie) |
| 123 | 123 |
| 124 // Total page count. | 124 // Total page count. |
| 125 IPC_STRUCT_MEMBER(int, page_count) | 125 IPC_STRUCT_MEMBER(int, page_count) |
| 126 | 126 |
| 127 // Indicates whether the previewed document is modifiable. | 127 // Indicates whether the previewed document is modifiable. |
| 128 IPC_STRUCT_MEMBER(bool, is_modifiable) | 128 IPC_STRUCT_MEMBER(bool, is_modifiable) |
| 129 | 129 |
| 130 // The id of the preview request. | 130 // The id of the preview request. |
| 131 IPC_STRUCT_MEMBER(int, preview_request_id) | 131 IPC_STRUCT_MEMBER(int, preview_request_id) |
| 132 |
| 133 // Indicates whether the existing preview data needs to be cleared or not. |
| 134 IPC_STRUCT_MEMBER(bool, clear_preview_data) |
| 132 IPC_STRUCT_END() | 135 IPC_STRUCT_END() |
| 133 | 136 |
| 134 // Parameters to describe a rendered page. | 137 // Parameters to describe a rendered page. |
| 135 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) | 138 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) |
| 136 // A shared memory handle to the EMF data. This data can be quite large so a | 139 // A shared memory handle to the EMF data. This data can be quite large so a |
| 137 // memory map needs to be used. | 140 // memory map needs to be used. |
| 138 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) | 141 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
| 139 | 142 |
| 140 // Size of the metafile data. | 143 // Size of the metafile data. |
| 141 IPC_STRUCT_MEMBER(uint32, data_size) | 144 IPC_STRUCT_MEMBER(uint32, data_size) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 205 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
| 203 DictionaryValue /* settings */) | 206 DictionaryValue /* settings */) |
| 204 | 207 |
| 205 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. | 208 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. |
| 206 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) | 209 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) |
| 207 | 210 |
| 208 // Tells a renderer to stop blocking script initiated printing. | 211 // Tells a renderer to stop blocking script initiated printing. |
| 209 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) | 212 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) |
| 210 | 213 |
| 211 // Tells a renderer to continue generating the print preview. | 214 // Tells a renderer to continue generating the print preview. |
| 212 // Use |requested_preview_page_index| to request a specific preview page data. | 215 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview) |
| 213 // |requested_preview_page_index| is 1-based or |printing::INVALID_PAGE_INDEX| | |
| 214 // to render the next page. | |
| 215 IPC_MESSAGE_ROUTED1(PrintMsg_ContinuePreview, | |
| 216 int /* requested_preview_page_index */) | |
| 217 | 216 |
| 218 // Tells a renderer to abort the print preview and reset all state. | 217 // Tells a renderer to abort the print preview and reset all state. |
| 219 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) | 218 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) |
| 220 | 219 |
| 221 // Messages sent from the renderer to the browser. | 220 // Messages sent from the renderer to the browser. |
| 222 | 221 |
| 223 #if defined(OS_WIN) | 222 #if defined(OS_WIN) |
| 224 // Duplicates a shared memory handle from the renderer to the browser. Then | 223 // Duplicates a shared memory handle from the renderer to the browser. Then |
| 225 // the renderer can flush the handle. | 224 // the renderer can flush the handle. |
| 226 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, | 225 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, | 283 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, |
| 285 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) | 284 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) |
| 286 | 285 |
| 287 // Notify the browser a print preview page has been rendered. | 286 // Notify the browser a print preview page has been rendered. |
| 288 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, | 287 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
| 289 PrintHostMsg_DidPreviewPage_Params /* params */) | 288 PrintHostMsg_DidPreviewPage_Params /* params */) |
| 290 | 289 |
| 291 // Sends back to the browser the complete rendered document for print preview | 290 // Sends back to the browser the complete rendered document for print preview |
| 292 // that was requested by a PrintMsg_PrintPreview message. The memory handle in | 291 // that was requested by a PrintMsg_PrintPreview message. The memory handle in |
| 293 // this message is already valid in the browser process. | 292 // this message is already valid in the browser process. |
| 294 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 293 IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, |
| 295 PrintHostMsg_DidPreviewDocument_Params /* params */) | 294 PrintHostMsg_DidPreviewDocument_Params /* params */) |
| 296 | 295 |
| 297 // Tell the browser printing failed. | 296 // Tell the browser printing failed. |
| 298 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 297 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
| 299 int /* document cookie */) | 298 int /* document cookie */) |
| 300 | 299 |
| 301 // Tell the browser print preview failed. | 300 // Tell the browser print preview failed. |
| 302 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 301 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
| 303 int /* document cookie */) | 302 int /* document cookie */) |
| OLD | NEW |