| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 IPC_STRUCT_MEMBER(bool, has_selection) | 313 IPC_STRUCT_MEMBER(bool, has_selection) |
| 314 IPC_STRUCT_MEMBER(bool, is_scripted) | 314 IPC_STRUCT_MEMBER(bool, is_scripted) |
| 315 IPC_STRUCT_MEMBER(bool, is_modifiable) | 315 IPC_STRUCT_MEMBER(bool, is_modifiable) |
| 316 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) | 316 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) |
| 317 IPC_STRUCT_END() | 317 IPC_STRUCT_END() |
| 318 | 318 |
| 319 | 319 |
| 320 // Messages sent from the browser to the renderer. | 320 // Messages sent from the browser to the renderer. |
| 321 | 321 |
| 322 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 322 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 323 // Tells the render view to initiate print preview for the entire document. | 323 // Tells the RenderFrame to initiate print preview for the entire document. |
| 324 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) | 324 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* has_selection */) |
| 325 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) | 325 #endif |
| 326 | 326 |
| 327 // Tells the render frame to initiate printing or print preview for a particular | 327 // Tells the RenderFrame to initiate printing or print preview for a particular |
| 328 // node, depending on which mode the render frame is in. | 328 // node, depending on which mode the RenderFrame is in. |
| 329 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) | 329 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) |
| 330 | 330 |
| 331 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) | 331 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 332 // Tells the renderer to print the print preview tab's PDF plugin without | 332 // Tells the renderer to print the print preview tab's PDF plugin without |
| 333 // showing the print dialog. (This is the final step in the print preview | 333 // showing the print dialog. (This is the final step in the print preview |
| 334 // workflow.) | 334 // workflow.) |
| 335 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, | 335 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, |
| 336 base::DictionaryValue /* settings */) | 336 base::DictionaryValue /* settings */) |
| 337 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) | 337 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 338 | 338 |
| 339 #if BUILDFLAG(ENABLE_BASIC_PRINTING) | 339 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 340 // Tells the render view to switch the CSS to print media type, renders every | 340 // Tells the RenderFrame to switch the CSS to print media type, renders every |
| 341 // requested pages and switch back the CSS to display media type. | 341 // requested pages and switch back the CSS to display media type. |
| 342 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) | 342 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) |
| 343 | 343 |
| 344 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. | 344 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. |
| 345 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) | 345 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) |
| 346 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) | 346 #endif |
| 347 | 347 |
| 348 // Tells the render view that printing is done so it can clean up. | 348 // Tells the RenderFrame that printing is done so it can clean up. |
| 349 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, | 349 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, |
| 350 bool /* success */) | 350 bool /* success */) |
| 351 | 351 |
| 352 // Tells the render view whether scripted printing is blocked or not. | 352 // Tells the RenderFrame whether printing is enabled or not. |
| 353 IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked, | 353 IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) |
| 354 bool /* blocked */) | |
| 355 | 354 |
| 356 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 355 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 357 // Tells the render view to switch the CSS to print media type, renders every | 356 // Tells the RenderFrame to switch the CSS to print media type, renders every |
| 358 // requested pages for print preview using the given |settings|. This gets | 357 // requested pages for print preview using the given |settings|. This gets |
| 359 // called multiple times as the user updates settings. | 358 // called multiple times as the user updates settings. |
| 360 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, | 359 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, |
| 361 base::DictionaryValue /* settings */) | 360 base::DictionaryValue /* settings */) |
| 362 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) | 361 #endif |
| 363 | 362 |
| 364 // Messages sent from the renderer to the browser. | 363 // Messages sent from the renderer to the browser. |
| 365 | 364 |
| 366 // Check if printing is enabled. | |
| 367 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_IsPrintingEnabled, | |
| 368 bool /* is_enabled */) | |
| 369 | |
| 370 // Tells the browser that the renderer is done calculating the number of | 365 // Tells the browser that the renderer is done calculating the number of |
| 371 // rendered pages according to the specified settings. | 366 // rendered pages according to the specified settings. |
| 372 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, | 367 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, |
| 373 int /* rendered document cookie */, | 368 int /* rendered document cookie */, |
| 374 int /* number of rendered pages */) | 369 int /* number of rendered pages */) |
| 375 | 370 |
| 376 // Sends the document cookie of the current printer query to the browser. | 371 // Sends the document cookie of the current printer query to the browser. |
| 377 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie, | 372 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie, |
| 378 int /* rendered document cookie */) | 373 int /* rendered document cookie */) |
| 379 | 374 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 | 478 |
| 484 // Tell the browser to show the print preview, when the document is sufficiently | 479 // Tell the browser to show the print preview, when the document is sufficiently |
| 485 // loaded such that the renderer can determine whether it is modifiable or not. | 480 // loaded such that the renderer can determine whether it is modifiable or not. |
| 486 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 481 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
| 487 bool /* is_modifiable */) | 482 bool /* is_modifiable */) |
| 488 | 483 |
| 489 // Notify the browser to set print presets based on source PDF document. | 484 // Notify the browser to set print presets based on source PDF document. |
| 490 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 485 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
| 491 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 486 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
| 492 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) | 487 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| OLD | NEW |