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