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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // Tells the render view to switch the CSS to print media type, renders every | 164 // 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 | 165 // requested pages for print preview using the given |settings|. This gets |
166 // called multiple times as the user updates settings. | 166 // called multiple times as the user updates settings. |
167 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 167 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
168 DictionaryValue /* settings */) | 168 DictionaryValue /* settings */) |
169 | 169 |
170 // Tells a renderer to stop blocking script initiated printing. | 170 // Tells a renderer to stop blocking script initiated printing. |
171 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) | 171 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) |
172 | 172 |
| 173 // Tells a renderer to continue generating the print preview. |
| 174 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview) |
| 175 |
| 176 // Tells a renderer to abort the print preview and reset all state. |
| 177 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) |
173 | 178 |
174 // Messages sent from the renderer to the browser. | 179 // Messages sent from the renderer to the browser. |
175 | 180 |
176 #if defined(OS_WIN) | 181 #if defined(OS_WIN) |
177 // Duplicates a shared memory handle from the renderer to the browser. Then | 182 // Duplicates a shared memory handle from the renderer to the browser. Then |
178 // the renderer can flush the handle. | 183 // the renderer can flush the handle. |
179 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, | 184 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, |
180 base::SharedMemoryHandle /* renderer handle */, | 185 base::SharedMemoryHandle /* renderer handle */, |
181 base::SharedMemoryHandle /* browser handle */) | 186 base::SharedMemoryHandle /* browser handle */) |
182 #endif | 187 #endif |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 base::FileDescriptor /* temp file fd */, | 232 base::FileDescriptor /* temp file fd */, |
228 int /* fd in browser*/) | 233 int /* fd in browser*/) |
229 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, | 234 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, |
230 int /* fd in browser */) | 235 int /* fd in browser */) |
231 #endif | 236 #endif |
232 | 237 |
233 // Asks the browser to do print preview. | 238 // Asks the browser to do print preview. |
234 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) | 239 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) |
235 | 240 |
236 // Notify the browser the number of pages in the print preview document. | 241 // Notify the browser the number of pages in the print preview document. |
237 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, | 242 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPreviewPageCount, |
| 243 int /* document cookie */, |
238 int /* page count */) | 244 int /* page count */) |
239 | 245 |
240 // Notify the browser a print preview page has been rendered. Give the browser | 246 // Notify the browser a print preview page has been rendered. Give the browser |
241 // a chance to cancel the print preview as needed. Page number is zero-based, | 247 // a chance to cancel the print preview as needed. Page number is zero-based, |
242 // and can be -1 if it is just a check. | 248 // and can be -1 if it is just a check. |
243 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DidPreviewPage, | 249 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
244 int /* page number */, | 250 int /* page number */) |
245 bool /* print preview cancelled */) | |
246 | 251 |
247 // Sends back to the browser the rendered "printed document" for preview that | 252 // Sends back to the browser the complete rendered document for print preview |
248 // was requested by a PrintMsg_PrintPreview message. The memory handle in this | 253 // that was requested by a PrintMsg_PrintPreview message. The memory handle in |
249 // message is already valid in the browser process. | 254 // this message is already valid in the browser process. |
250 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 255 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, |
251 PrintHostMsg_DidPreviewDocument_Params /* params */) | 256 PrintHostMsg_DidPreviewDocument_Params /* params */) |
252 | 257 |
253 // Tell the browser printing failed. | 258 // Tell the browser printing failed. |
254 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 259 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
255 int /* document cookie */) | 260 int /* document cookie */) |
256 | 261 |
257 // Tell the browser print preview failed. | 262 // Tell the browser print preview failed. |
258 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 263 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
259 int /* document cookie */) | 264 int /* document cookie */) |
260 | |
261 // Tell the browser print preview was cancelled. | |
262 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, | |
263 int /* document cookie */) | |
OLD | NEW |