OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 PrintMsg_PrintPages_Params(); | 63 PrintMsg_PrintPages_Params(); |
64 ~PrintMsg_PrintPages_Params(); | 64 ~PrintMsg_PrintPages_Params(); |
65 | 65 |
66 // Resets the members of the struct to 0. | 66 // Resets the members of the struct to 0. |
67 void Reset(); | 67 void Reset(); |
68 | 68 |
69 PrintMsg_Print_Params params; | 69 PrintMsg_Print_Params params; |
70 std::vector<int> pages; | 70 std::vector<int> pages; |
71 }; | 71 }; |
72 | 72 |
| 73 #if defined(ENABLE_PRINT_PREVIEW) |
73 struct PrintHostMsg_RequestPrintPreview_Params { | 74 struct PrintHostMsg_RequestPrintPreview_Params { |
74 PrintHostMsg_RequestPrintPreview_Params(); | 75 PrintHostMsg_RequestPrintPreview_Params(); |
75 ~PrintHostMsg_RequestPrintPreview_Params(); | 76 ~PrintHostMsg_RequestPrintPreview_Params(); |
76 bool is_modifiable; | 77 bool is_modifiable; |
77 bool webnode_only; | 78 bool webnode_only; |
78 bool has_selection; | 79 bool has_selection; |
79 bool selection_only; | 80 bool selection_only; |
80 }; | 81 }; |
81 | 82 |
82 struct PrintHostMsg_SetOptionsFromDocument_Params { | 83 struct PrintHostMsg_SetOptionsFromDocument_Params { |
83 PrintHostMsg_SetOptionsFromDocument_Params(); | 84 PrintHostMsg_SetOptionsFromDocument_Params(); |
84 ~PrintHostMsg_SetOptionsFromDocument_Params(); | 85 ~PrintHostMsg_SetOptionsFromDocument_Params(); |
85 | 86 |
86 bool is_scaling_disabled; | 87 bool is_scaling_disabled; |
87 int copies; | 88 int copies; |
88 printing::DuplexMode duplex; | 89 printing::DuplexMode duplex; |
89 printing::PageRanges page_ranges; | 90 printing::PageRanges page_ranges; |
90 }; | 91 }; |
| 92 #endif // defined(ENABLE_PRINT_PREVIEW) |
91 | 93 |
92 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 94 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
93 | 95 |
94 #define IPC_MESSAGE_START PrintMsgStart | 96 #define IPC_MESSAGE_START PrintMsgStart |
95 | 97 |
96 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, | 98 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPrintScalingOption, |
97 blink::WebPrintScalingOptionLast) | 99 blink::WebPrintScalingOptionLast) |
98 | 100 |
99 // Parameters for a render request. | 101 // Parameters for a render request. |
100 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) | 102 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) | 170 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) |
169 // Parameters to render the page as a printed page. It must always be the same | 171 // Parameters to render the page as a printed page. It must always be the same |
170 // value for all the document. | 172 // value for all the document. |
171 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) | 173 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) |
172 | 174 |
173 // The page number is the indicator of the square that should be rendered | 175 // The page number is the indicator of the square that should be rendered |
174 // according to the layout specified in PrintMsg_Print_Params. | 176 // according to the layout specified in PrintMsg_Print_Params. |
175 IPC_STRUCT_MEMBER(int, page_number) | 177 IPC_STRUCT_MEMBER(int, page_number) |
176 IPC_STRUCT_END() | 178 IPC_STRUCT_END() |
177 | 179 |
| 180 IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) |
| 181 IPC_STRUCT_TRAITS_MEMBER(from) |
| 182 IPC_STRUCT_TRAITS_MEMBER(to) |
| 183 IPC_STRUCT_TRAITS_END() |
| 184 |
| 185 #if defined(ENABLE_PRINT_PREVIEW) |
178 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) | 186 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) |
179 IPC_STRUCT_TRAITS_MEMBER(is_modifiable) | 187 IPC_STRUCT_TRAITS_MEMBER(is_modifiable) |
180 IPC_STRUCT_TRAITS_MEMBER(webnode_only) | 188 IPC_STRUCT_TRAITS_MEMBER(webnode_only) |
181 IPC_STRUCT_TRAITS_MEMBER(has_selection) | 189 IPC_STRUCT_TRAITS_MEMBER(has_selection) |
182 IPC_STRUCT_TRAITS_MEMBER(selection_only) | 190 IPC_STRUCT_TRAITS_MEMBER(selection_only) |
183 IPC_STRUCT_TRAITS_END() | 191 IPC_STRUCT_TRAITS_END() |
184 | 192 |
185 IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) | |
186 IPC_STRUCT_TRAITS_MEMBER(from) | |
187 IPC_STRUCT_TRAITS_MEMBER(to) | |
188 IPC_STRUCT_TRAITS_END() | |
189 | |
190 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) | 193 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) |
191 // Specifies whether print scaling is enabled or not. | 194 // Specifies whether print scaling is enabled or not. |
192 IPC_STRUCT_TRAITS_MEMBER(is_scaling_disabled) | 195 IPC_STRUCT_TRAITS_MEMBER(is_scaling_disabled) |
193 | 196 |
194 // Specifies number of copies to be printed. | 197 // Specifies number of copies to be printed. |
195 IPC_STRUCT_TRAITS_MEMBER(copies) | 198 IPC_STRUCT_TRAITS_MEMBER(copies) |
196 | 199 |
197 // Specifies paper handling option. | 200 // Specifies paper handling option. |
198 IPC_STRUCT_TRAITS_MEMBER(duplex) | 201 IPC_STRUCT_TRAITS_MEMBER(duplex) |
199 | 202 |
200 // Specifies page range to be printed. | 203 // Specifies page range to be printed. |
201 IPC_STRUCT_TRAITS_MEMBER(page_ranges) | 204 IPC_STRUCT_TRAITS_MEMBER(page_ranges) |
202 IPC_STRUCT_TRAITS_END() | 205 IPC_STRUCT_TRAITS_END() |
| 206 #endif // defined(ENABLE_PRINT_PREVIEW) |
203 | 207 |
204 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) | 208 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) |
205 IPC_STRUCT_TRAITS_MEMBER(content_width) | 209 IPC_STRUCT_TRAITS_MEMBER(content_width) |
206 IPC_STRUCT_TRAITS_MEMBER(content_height) | 210 IPC_STRUCT_TRAITS_MEMBER(content_height) |
207 IPC_STRUCT_TRAITS_MEMBER(margin_left) | 211 IPC_STRUCT_TRAITS_MEMBER(margin_left) |
208 IPC_STRUCT_TRAITS_MEMBER(margin_right) | 212 IPC_STRUCT_TRAITS_MEMBER(margin_right) |
209 IPC_STRUCT_TRAITS_MEMBER(margin_top) | 213 IPC_STRUCT_TRAITS_MEMBER(margin_top) |
210 IPC_STRUCT_TRAITS_MEMBER(margin_bottom) | 214 IPC_STRUCT_TRAITS_MEMBER(margin_bottom) |
211 IPC_STRUCT_TRAITS_END() | 215 IPC_STRUCT_TRAITS_END() |
212 | 216 |
213 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) | 217 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) |
214 // Parameters to render the page as a printed page. It must always be the same | 218 // Parameters to render the page as a printed page. It must always be the same |
215 // value for all the document. | 219 // value for all the document. |
216 IPC_STRUCT_TRAITS_MEMBER(params) | 220 IPC_STRUCT_TRAITS_MEMBER(params) |
217 | 221 |
218 // If empty, this means a request to render all the printed pages. | 222 // If empty, this means a request to render all the printed pages. |
219 IPC_STRUCT_TRAITS_MEMBER(pages) | 223 IPC_STRUCT_TRAITS_MEMBER(pages) |
220 IPC_STRUCT_TRAITS_END() | 224 IPC_STRUCT_TRAITS_END() |
221 | 225 |
| 226 #if defined(ENABLE_PRINT_PREVIEW) |
222 // Parameters to describe a rendered document. | 227 // Parameters to describe a rendered document. |
223 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) | 228 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) |
224 // A shared memory handle to metafile data. | 229 // A shared memory handle to metafile data. |
225 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) | 230 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
226 | 231 |
227 // Size of metafile data. | 232 // Size of metafile data. |
228 IPC_STRUCT_MEMBER(uint32_t, data_size) | 233 IPC_STRUCT_MEMBER(uint32_t, data_size) |
229 | 234 |
230 // Cookie for the document to ensure correctness. | 235 // Cookie for the document to ensure correctness. |
231 IPC_STRUCT_MEMBER(int, document_cookie) | 236 IPC_STRUCT_MEMBER(int, document_cookie) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 270 |
266 // Indicates whether the previewed document is modifiable. | 271 // Indicates whether the previewed document is modifiable. |
267 IPC_STRUCT_MEMBER(bool, is_modifiable) | 272 IPC_STRUCT_MEMBER(bool, is_modifiable) |
268 | 273 |
269 // The id of the preview request. | 274 // The id of the preview request. |
270 IPC_STRUCT_MEMBER(int, preview_request_id) | 275 IPC_STRUCT_MEMBER(int, preview_request_id) |
271 | 276 |
272 // Indicates whether the existing preview data needs to be cleared or not. | 277 // Indicates whether the existing preview data needs to be cleared or not. |
273 IPC_STRUCT_MEMBER(bool, clear_preview_data) | 278 IPC_STRUCT_MEMBER(bool, clear_preview_data) |
274 IPC_STRUCT_END() | 279 IPC_STRUCT_END() |
| 280 #endif // defined(ENABLE_PRINT_PREVIEW) |
275 | 281 |
276 // Parameters to describe a rendered page. | 282 // Parameters to describe a rendered page. |
277 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) | 283 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) |
278 // A shared memory handle to the EMF data. This data can be quite large so a | 284 // A shared memory handle to the EMF data. This data can be quite large so a |
279 // memory map needs to be used. | 285 // memory map needs to be used. |
280 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) | 286 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
281 | 287 |
282 // Size of the metafile data. | 288 // Size of the metafile data. |
283 IPC_STRUCT_MEMBER(uint32_t, data_size) | 289 IPC_STRUCT_MEMBER(uint32_t, data_size) |
284 | 290 |
(...skipping 17 matching lines...) Expand all Loading... |
302 IPC_STRUCT_MEMBER(int, cookie) | 308 IPC_STRUCT_MEMBER(int, cookie) |
303 IPC_STRUCT_MEMBER(int, expected_pages_count) | 309 IPC_STRUCT_MEMBER(int, expected_pages_count) |
304 IPC_STRUCT_MEMBER(bool, has_selection) | 310 IPC_STRUCT_MEMBER(bool, has_selection) |
305 IPC_STRUCT_MEMBER(bool, is_scripted) | 311 IPC_STRUCT_MEMBER(bool, is_scripted) |
306 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) | 312 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) |
307 IPC_STRUCT_END() | 313 IPC_STRUCT_END() |
308 | 314 |
309 | 315 |
310 // Messages sent from the browser to the renderer. | 316 // Messages sent from the browser to the renderer. |
311 | 317 |
| 318 #if defined(ENABLE_PRINT_PREVIEW) |
312 // Tells the render view to initiate print preview for the entire document. | 319 // Tells the render view to initiate print preview for the entire document. |
313 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) | 320 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) |
| 321 #endif // defined(ENABLE_PRINT_PREVIEW) |
314 | 322 |
315 // Tells the render frame to initiate printing or print preview for a particular | 323 // Tells the render frame to initiate printing or print preview for a particular |
316 // node, depending on which mode the render frame is in. | 324 // node, depending on which mode the render frame is in. |
317 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) | 325 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) |
318 | 326 |
| 327 #if defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) |
319 // Tells the renderer to print the print preview tab's PDF plugin without | 328 // Tells the renderer to print the print preview tab's PDF plugin without |
320 // showing the print dialog. (This is the final step in the print preview | 329 // showing the print dialog. (This is the final step in the print preview |
321 // workflow.) | 330 // workflow.) |
322 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, | 331 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, |
323 base::DictionaryValue /* settings */) | 332 base::DictionaryValue /* settings */) |
| 333 #endif // defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) |
324 | 334 |
325 #if defined(ENABLE_BASIC_PRINTING) | 335 #if defined(ENABLE_BASIC_PRINTING) |
326 // Tells the render view to switch the CSS to print media type, renders every | 336 // Tells the render view to switch the CSS to print media type, renders every |
327 // requested pages and switch back the CSS to display media type. | 337 // requested pages and switch back the CSS to display media type. |
328 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) | 338 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) |
329 | 339 |
330 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. | 340 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. |
331 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) | 341 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) |
332 #endif // ENABLE_BASIC_PRINTING | 342 #endif // defined(ENABLE_BASIC_PRINTING) |
333 | 343 |
334 // Tells the render view that printing is done so it can clean up. | 344 // Tells the render view that printing is done so it can clean up. |
335 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, | 345 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, |
336 bool /* success */) | 346 bool /* success */) |
337 | 347 |
338 // Tells the render view whether scripted printing is blocked or not. | 348 // Tells the render view whether scripted printing is blocked or not. |
339 IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked, | 349 IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked, |
340 bool /* blocked */) | 350 bool /* blocked */) |
341 | 351 |
| 352 #if defined(ENABLE_PRINT_PREVIEW) |
342 // Tells the render view to switch the CSS to print media type, renders every | 353 // Tells the render view to switch the CSS to print media type, renders every |
343 // requested pages for print preview using the given |settings|. This gets | 354 // requested pages for print preview using the given |settings|. This gets |
344 // called multiple times as the user updates settings. | 355 // called multiple times as the user updates settings. |
345 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 356 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
346 base::DictionaryValue /* settings */) | 357 base::DictionaryValue /* settings */) |
| 358 #endif // defined(ENABLE_PRINT_PREVIEW) |
347 | 359 |
348 // Messages sent from the renderer to the browser. | 360 // Messages sent from the renderer to the browser. |
349 | 361 |
350 #if defined(OS_WIN) | 362 #if defined(OS_WIN) |
351 // Duplicates a shared memory handle from the renderer to the browser. Then | 363 // Duplicates a shared memory handle from the renderer to the browser. Then |
352 // the renderer can flush the handle. | 364 // the renderer can flush the handle. |
353 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, | 365 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, |
354 base::SharedMemoryHandle /* renderer handle */, | 366 base::SharedMemoryHandle /* renderer handle */, |
355 base::SharedMemoryHandle /* browser handle */) | 367 base::SharedMemoryHandle /* browser handle */) |
356 #endif | 368 #endif |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 #if defined(OS_ANDROID) | 414 #if defined(OS_ANDROID) |
403 // Asks the browser to create a temporary file for the renderer to fill | 415 // Asks the browser to create a temporary file for the renderer to fill |
404 // in resulting PdfMetafileSkia in printing. | 416 // in resulting PdfMetafileSkia in printing. |
405 IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, | 417 IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, |
406 int /* render_view_id */, | 418 int /* render_view_id */, |
407 base::FileDescriptor /* temp file fd */, | 419 base::FileDescriptor /* temp file fd */, |
408 int /* fd in browser*/) // Used only by Chrome OS. | 420 int /* fd in browser*/) // Used only by Chrome OS. |
409 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, | 421 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, |
410 int /* render_view_id */, | 422 int /* render_view_id */, |
411 int /* fd in browser */) // Used only by Chrome OS. | 423 int /* fd in browser */) // Used only by Chrome OS. |
412 #endif | 424 #endif // defined(OS_ANDROID) |
413 | 425 |
| 426 #if defined(ENABLE_PRINT_PREVIEW) |
414 // Asks the browser to do print preview. | 427 // Asks the browser to do print preview. |
415 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, | 428 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, |
416 PrintHostMsg_RequestPrintPreview_Params /* params */) | 429 PrintHostMsg_RequestPrintPreview_Params /* params */) |
417 | 430 |
418 // Notify the browser the number of pages in the print preview document. | 431 // Notify the browser the number of pages in the print preview document. |
419 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, | 432 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, |
420 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) | 433 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) |
421 | 434 |
422 // Notify the browser of the default page layout according to the currently | 435 // Notify the browser of the default page layout according to the currently |
423 // selected printer and page size. | 436 // selected printer and page size. |
424 // |printable_area_in_points| Specifies the printable area in points. | 437 // |printable_area_in_points| Specifies the printable area in points. |
425 // |has_custom_page_size_style| is true when the printing frame has a custom | 438 // |has_custom_page_size_style| is true when the printing frame has a custom |
426 // page size css otherwise false. | 439 // page size css otherwise false. |
427 IPC_MESSAGE_ROUTED3(PrintHostMsg_DidGetDefaultPageLayout, | 440 IPC_MESSAGE_ROUTED3(PrintHostMsg_DidGetDefaultPageLayout, |
428 printing::PageSizeMargins /* page layout in points */, | 441 printing::PageSizeMargins /* page layout in points */, |
429 gfx::Rect /* printable area in points */, | 442 gfx::Rect /* printable area in points */, |
430 bool /* has custom page size style */) | 443 bool /* has custom page size style */) |
431 | 444 |
432 // Notify the browser a print preview page has been rendered. | 445 // Notify the browser a print preview page has been rendered. |
433 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, | 446 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
434 PrintHostMsg_DidPreviewPage_Params /* params */) | 447 PrintHostMsg_DidPreviewPage_Params /* params */) |
435 | 448 |
436 // Asks the browser whether the print preview has been cancelled. | 449 // Asks the browser whether the print preview has been cancelled. |
437 IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, | 450 IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, |
438 int32_t /* PrintPreviewUI ID */, | 451 int32_t /* PrintPreviewUI ID */, |
439 int /* request id */, | 452 int /* request id */, |
440 bool /* print preview cancelled */) | 453 bool /* print preview cancelled */) |
441 | 454 |
442 // This is sent when there are invalid printer settings. | |
443 IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) | |
444 | |
445 // Sends back to the browser the complete rendered document (non-draft mode, | 455 // Sends back to the browser the complete rendered document (non-draft mode, |
446 // used for printing) that was requested by a PrintMsg_PrintPreview message. | 456 // used for printing) that was requested by a PrintMsg_PrintPreview message. |
447 // The memory handle in this message is already valid in the browser process. | 457 // The memory handle in this message is already valid in the browser process. |
448 IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, | 458 IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting, |
449 PrintHostMsg_DidPreviewDocument_Params /* params */) | 459 PrintHostMsg_DidPreviewDocument_Params /* params */) |
| 460 #endif // defined(ENABLE_PRINT_PREVIEW) |
| 461 |
| 462 // This is sent when there are invalid printer settings. |
| 463 IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) |
450 | 464 |
451 // Tell the browser printing failed. | 465 // Tell the browser printing failed. |
452 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 466 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
453 int /* document cookie */) | 467 int /* document cookie */) |
454 | 468 |
| 469 #if defined(ENABLE_PRINT_PREVIEW) |
455 // Tell the browser print preview failed. | 470 // Tell the browser print preview failed. |
456 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 471 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
457 int /* document cookie */) | 472 int /* document cookie */) |
458 | 473 |
459 // Tell the browser print preview was cancelled. | 474 // Tell the browser print preview was cancelled. |
460 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, | 475 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, |
461 int /* document cookie */) | 476 int /* document cookie */) |
462 | 477 |
463 // Tell the browser print preview found the selected printer has invalid | 478 // Tell the browser print preview found the selected printer has invalid |
464 // settings (which typically caused by disconnected network printer or printer | 479 // settings (which typically caused by disconnected network printer or printer |
465 // driver is bogus). | 480 // driver is bogus). |
466 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, | 481 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, |
467 int /* document cookie */) | 482 int /* document cookie */) |
468 | 483 |
469 // Run a nested message loop in the renderer until print preview for | 484 // Run a nested message loop in the renderer until print preview for |
470 // window.print() finishes. | 485 // window.print() finishes. |
471 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) | 486 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) |
472 | 487 |
473 // Tell the browser to show the print preview, when the document is sufficiently | 488 // Tell the browser to show the print preview, when the document is sufficiently |
474 // loaded such that the renderer can determine whether it is modifiable or not. | 489 // loaded such that the renderer can determine whether it is modifiable or not. |
475 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 490 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
476 bool /* is_modifiable */) | 491 bool /* is_modifiable */) |
477 | 492 |
478 // Notify the browser to set print presets based on source PDF document. | 493 // Notify the browser to set print presets based on source PDF document. |
479 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 494 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
480 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 495 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
| 496 #endif // defined(ENABLE_PRINT_PREVIEW) |
OLD | NEW |