| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 180 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
| 181 DictionaryValue /* settings */) | 181 DictionaryValue /* settings */) |
| 182 | 182 |
| 183 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. | 183 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. |
| 184 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) | 184 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) |
| 185 | 185 |
| 186 // Tells a renderer to stop blocking script initiated printing. | 186 // Tells a renderer to stop blocking script initiated printing. |
| 187 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) | 187 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) |
| 188 | 188 |
| 189 // Tells a renderer to continue generating the print preview. | 189 // Tells a renderer to continue generating the print preview. |
| 190 // Use |requested_preview_page_index| to request a specific preview page data. | 190 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview) |
| 191 // |requested_preview_page_index| is 1-based or |printing::INVALID_PAGE_INDEX| | |
| 192 // to render the next page. | |
| 193 IPC_MESSAGE_ROUTED1(PrintMsg_ContinuePreview, | |
| 194 int /* requested_preview_page_index */) | |
| 195 | 191 |
| 196 // Tells a renderer to abort the print preview and reset all state. | 192 // Tells a renderer to abort the print preview and reset all state. |
| 197 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) | 193 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) |
| 198 | 194 |
| 199 // Messages sent from the renderer to the browser. | 195 // Messages sent from the renderer to the browser. |
| 200 | 196 |
| 201 #if defined(OS_WIN) | 197 #if defined(OS_WIN) |
| 202 // Duplicates a shared memory handle from the renderer to the browser. Then | 198 // Duplicates a shared memory handle from the renderer to the browser. Then |
| 203 // the renderer can flush the handle. | 199 // the renderer can flush the handle. |
| 204 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, | 200 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 base::FileDescriptor /* temp file fd */, | 248 base::FileDescriptor /* temp file fd */, |
| 253 int /* fd in browser*/) | 249 int /* fd in browser*/) |
| 254 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, | 250 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, |
| 255 int /* fd in browser */) | 251 int /* fd in browser */) |
| 256 #endif | 252 #endif |
| 257 | 253 |
| 258 // Asks the browser to do print preview. | 254 // Asks the browser to do print preview. |
| 259 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) | 255 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) |
| 260 | 256 |
| 261 // Notify the browser the number of pages in the print preview document. | 257 // Notify the browser the number of pages in the print preview document. |
| 262 IPC_MESSAGE_ROUTED3(PrintHostMsg_DidGetPreviewPageCount, | 258 IPC_MESSAGE_ROUTED4(PrintHostMsg_DidGetPreviewPageCount, |
| 263 int /* document cookie */, | 259 int /* document cookie */, |
| 264 int /* page count */, | 260 int /* page count */, |
| 265 bool /* is modifiable */) | 261 bool /* is modifiable */, |
| 262 bool /* clear all preview data */) |
| 266 | 263 |
| 267 // Notify the browser a print preview page has been rendered. | 264 // Notify the browser a print preview page has been rendered. |
| 268 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, | 265 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
| 269 PrintHostMsg_DidPreviewPage_Params /* params */) | 266 PrintHostMsg_DidPreviewPage_Params /* params */) |
| 270 | 267 |
| 271 // Sends back to the browser the complete rendered document for print preview | 268 // 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 | 269 // that was requested by a PrintMsg_PrintPreview message. The memory handle in |
| 273 // this message is already valid in the browser process. | 270 // this message is already valid in the browser process. |
| 274 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 271 IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, |
| 275 PrintHostMsg_DidPreviewDocument_Params /* params */) | 272 PrintHostMsg_DidPreviewDocument_Params /* params */) |
| 276 | 273 |
| 277 // Tell the browser printing failed. | 274 // Tell the browser printing failed. |
| 278 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 275 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
| 279 int /* document cookie */) | 276 int /* document cookie */) |
| 280 | 277 |
| 281 // Tell the browser print preview failed. | 278 // Tell the browser print preview failed. |
| 282 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 279 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
| 283 int /* document cookie */) | 280 int /* document cookie */) |
| OLD | NEW |