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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 // Tells the browser that the print dialog has been shown. | 374 // Tells the browser that the print dialog has been shown. |
375 IPC_MESSAGE_ROUTED0(PrintHostMsg_DidShowPrintDialog) | 375 IPC_MESSAGE_ROUTED0(PrintHostMsg_DidShowPrintDialog) |
376 | 376 |
377 // Sends back to the browser the rendered "printed page" that was requested by | 377 // Sends back to the browser the rendered "printed page" that was requested by |
378 // a ViewMsg_PrintPage message or from scripted printing. The memory handle in | 378 // a ViewMsg_PrintPage message or from scripted printing. The memory handle in |
379 // this message is already valid in the browser process. | 379 // this message is already valid in the browser process. |
380 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPrintPage, | 380 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPrintPage, |
381 PrintHostMsg_DidPrintPage_Params /* page content */) | 381 PrintHostMsg_DidPrintPage_Params /* page content */) |
382 | 382 |
383 // The renderer wants to know the default print settings. | 383 // The renderer wants to know the default print settings. |
384 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_GetDefaultPrintSettings, | 384 IPC_SYNC_MESSAGE_CONTROL1_1(PrintHostMsg_GetDefaultPrintSettings, |
385 PrintMsg_Print_Params /* default_settings */) | 385 int /* render_view_id */, |
| 386 PrintMsg_Print_Params /* default_settings */) |
386 | 387 |
387 // The renderer wants to update the current print settings with new | 388 // The renderer wants to update the current print settings with new |
388 // |job_settings|. | 389 // |job_settings|. |
389 IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_UpdatePrintSettings, | 390 IPC_SYNC_MESSAGE_CONTROL3_1(PrintHostMsg_UpdatePrintSettings, |
390 int /* document_cookie */, | 391 int /* render_view_id */, |
391 base::DictionaryValue /* job_settings */, | 392 int /* document_cookie */, |
392 PrintMsg_PrintPages_Params /* current_settings */) | 393 base::DictionaryValue /* job_settings */, |
| 394 PrintMsg_PrintPages_Params /* current_settings */) |
393 | 395 |
394 // It's the renderer that controls the printing process when it is generated | 396 // It's the renderer that controls the printing process when it is generated |
395 // by javascript. This step is about showing UI to the user to select the | 397 // by javascript. This step is about showing UI to the user to select the |
396 // final print settings. The output parameter is the same as | 398 // final print settings. The output parameter is the same as |
397 // ViewMsg_PrintPages which is executed implicitly. | 399 // ViewMsg_PrintPages which is executed implicitly. |
398 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_ScriptedPrint, | 400 IPC_SYNC_MESSAGE_CONTROL2_1(PrintHostMsg_ScriptedPrint, |
399 PrintHostMsg_ScriptedPrint_Params, | 401 int /* render_view_id */, |
400 PrintMsg_PrintPages_Params | 402 PrintHostMsg_ScriptedPrint_Params, |
401 /* settings chosen by the user*/) | 403 PrintMsg_PrintPages_Params /* user settings*/) |
402 | 404 |
403 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 405 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
404 // Asks the browser to create a temporary file for the renderer to fill | 406 // Asks the browser to create a temporary file for the renderer to fill |
405 // in resulting NativeMetafile in printing. | 407 // in resulting NativeMetafile in printing. |
406 IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, | 408 IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, |
407 int /* render_view_id */, | 409 int /* render_view_id */, |
408 base::FileDescriptor /* temp file fd */, | 410 base::FileDescriptor /* temp file fd */, |
409 int /* fd in browser*/) // Used only by Chrome OS. | 411 int /* fd in browser*/) // Used only by Chrome OS. |
410 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, | 412 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, |
411 int /* render_view_id */, | 413 int /* render_view_id */, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) | 474 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) |
473 | 475 |
474 // Tell the browser to show the print preview, when the document is sufficiently | 476 // Tell the browser to show the print preview, when the document is sufficiently |
475 // loaded such that the renderer can determine whether it is modifiable or not. | 477 // loaded such that the renderer can determine whether it is modifiable or not. |
476 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 478 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
477 bool /* is_modifiable */) | 479 bool /* is_modifiable */) |
478 | 480 |
479 // Notify the browser to set print presets based on source PDF document. | 481 // Notify the browser to set print presets based on source PDF document. |
480 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 482 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
481 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 483 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
OLD | NEW |