Print enhancement: add webContents.printerList And a print option to select printer
This commit is contained in:
parent
093b844859
commit
023a3fd547
15 changed files with 290 additions and 27 deletions
|
@ -52,6 +52,7 @@ struct PrintMsg_Print_Params {
|
|||
base::string16 title;
|
||||
base::string16 url;
|
||||
bool should_print_backgrounds;
|
||||
base::string16 device_name;
|
||||
};
|
||||
|
||||
struct PrintMsg_PrintPages_Params {
|
||||
|
@ -213,9 +214,10 @@ IPC_STRUCT_END()
|
|||
|
||||
// Tells the render view to switch the CSS to print media type, renders every
|
||||
// requested pages and switch back the CSS to display media type.
|
||||
IPC_MESSAGE_ROUTED2(PrintMsg_PrintPages,
|
||||
IPC_MESSAGE_ROUTED3(PrintMsg_PrintPages,
|
||||
bool /* silent print */,
|
||||
bool /* print page's background */)
|
||||
bool /* print page's background */,
|
||||
base::string16 /* device name*/)
|
||||
|
||||
// Tells the render view that printing is done so it can clean up.
|
||||
IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
|
||||
|
@ -260,6 +262,11 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPrintPage,
|
|||
IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_GetDefaultPrintSettings,
|
||||
PrintMsg_Print_Params /* default_settings */)
|
||||
|
||||
// you can set the printer
|
||||
IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_InitSettingWithDeviceName,
|
||||
base::string16, /* device name */
|
||||
PrintMsg_Print_Params /* default_settings */)
|
||||
|
||||
// The renderer wants to update the current print settings with new
|
||||
// |job_settings|.
|
||||
IPC_SYNC_MESSAGE_ROUTED2_2(PrintHostMsg_UpdatePrintSettings,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue