| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 double dpi; | 33 double dpi; |
| 34 double min_shrink; | 34 double min_shrink; |
| 35 double max_shrink; | 35 double max_shrink; |
| 36 int desired_dpi; | 36 int desired_dpi; |
| 37 int document_cookie; | 37 int document_cookie; |
| 38 bool selection_only; | 38 bool selection_only; |
| 39 bool supports_alpha_blend; | 39 bool supports_alpha_blend; |
| 40 std::string preview_ui_addr; | 40 std::string preview_ui_addr; |
| 41 int preview_request_id; | 41 int preview_request_id; |
| 42 bool is_first_request; | 42 bool is_first_request; |
| 43 bool print_to_pdf; |
| 43 bool display_header_footer; | 44 bool display_header_footer; |
| 44 string16 date; | 45 string16 date; |
| 45 string16 title; | 46 string16 title; |
| 46 string16 url; | 47 string16 url; |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 struct PrintMsg_PrintPages_Params { | 50 struct PrintMsg_PrintPages_Params { |
| 50 PrintMsg_PrintPages_Params(); | 51 PrintMsg_PrintPages_Params(); |
| 51 ~PrintMsg_PrintPages_Params(); | 52 ~PrintMsg_PrintPages_Params(); |
| 52 | 53 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 104 |
| 104 // The print preview ui associated with this request. | 105 // The print preview ui associated with this request. |
| 105 IPC_STRUCT_TRAITS_MEMBER(preview_ui_addr) | 106 IPC_STRUCT_TRAITS_MEMBER(preview_ui_addr) |
| 106 | 107 |
| 107 // The id of the preview request. | 108 // The id of the preview request. |
| 108 IPC_STRUCT_TRAITS_MEMBER(preview_request_id) | 109 IPC_STRUCT_TRAITS_MEMBER(preview_request_id) |
| 109 | 110 |
| 110 // True if this is the first preview request. | 111 // True if this is the first preview request. |
| 111 IPC_STRUCT_TRAITS_MEMBER(is_first_request) | 112 IPC_STRUCT_TRAITS_MEMBER(is_first_request) |
| 112 | 113 |
| 114 // True if print to pdf is requested. |
| 115 IPC_STRUCT_TRAITS_MEMBER(print_to_pdf) |
| 116 |
| 113 // Specifies if the header and footer should be rendered. | 117 // Specifies if the header and footer should be rendered. |
| 114 IPC_STRUCT_TRAITS_MEMBER(display_header_footer) | 118 IPC_STRUCT_TRAITS_MEMBER(display_header_footer) |
| 115 | 119 |
| 116 // Date string to be printed as header if requested by the user. | 120 // Date string to be printed as header if requested by the user. |
| 117 IPC_STRUCT_TRAITS_MEMBER(date) | 121 IPC_STRUCT_TRAITS_MEMBER(date) |
| 118 | 122 |
| 119 // Title string to be printed as header if requested by the user. | 123 // Title string to be printed as header if requested by the user. |
| 120 IPC_STRUCT_TRAITS_MEMBER(title) | 124 IPC_STRUCT_TRAITS_MEMBER(title) |
| 121 | 125 |
| 122 // URL string to be printed as footer if requested by the user. | 126 // URL string to be printed as footer if requested by the user. |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 348 |
| 345 // Asks the browser to do print preview. | 349 // Asks the browser to do print preview. |
| 346 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, bool /* is_modifiable */) | 350 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, bool /* is_modifiable */) |
| 347 | 351 |
| 348 // Notify the browser the number of pages in the print preview document. | 352 // Notify the browser the number of pages in the print preview document. |
| 349 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, | 353 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, |
| 350 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) | 354 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) |
| 351 | 355 |
| 352 // Notify the browser of the default page layout according to the currently | 356 // Notify the browser of the default page layout according to the currently |
| 353 // selected printer and page size. | 357 // selected printer and page size. |
| 354 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDefaultPageLayout, | 358 // |has_custom_page_size_style| is true when the printing frame has a custom |
| 355 printing::PageSizeMargins /* page layout in points */) | 359 // page size css otherwise false. |
| 360 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetDefaultPageLayout, |
| 361 printing::PageSizeMargins /* page layout in points */, |
| 362 bool /* has custom page size style */) |
| 356 | 363 |
| 357 // Notify the browser a print preview page has been rendered. | 364 // Notify the browser a print preview page has been rendered. |
| 358 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, | 365 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
| 359 PrintHostMsg_DidPreviewPage_Params /* params */) | 366 PrintHostMsg_DidPreviewPage_Params /* params */) |
| 360 | 367 |
| 361 // Asks the browser whether the print preview has been cancelled. | 368 // Asks the browser whether the print preview has been cancelled. |
| 362 IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, | 369 IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, |
| 363 std::string /* print preview ui address */, | 370 std::string /* print preview ui address */, |
| 364 int /* request id */, | 371 int /* request id */, |
| 365 bool /* print preview cancelled */) | 372 bool /* print preview cancelled */) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 384 | 391 |
| 385 // Tell the browser print preview found the selected printer has invalid | 392 // Tell the browser print preview found the selected printer has invalid |
| 386 // settings (which typically caused by disconnected network printer or printer | 393 // settings (which typically caused by disconnected network printer or printer |
| 387 // driver is bogus). | 394 // driver is bogus). |
| 388 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, | 395 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, |
| 389 int /* document cookie */) | 396 int /* document cookie */) |
| 390 | 397 |
| 391 // Run a nested message loop in the renderer until print preview for | 398 // Run a nested message loop in the renderer until print preview for |
| 392 // window.print() finishes. | 399 // window.print() finishes. |
| 393 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_ScriptedPrintPreview) | 400 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_ScriptedPrintPreview) |
| OLD | NEW |