diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-19 12:37:02 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-01-25 14:41:06 +0000 |
commit | f4a8ce98bd371acf1ca1eb2c58a8403e8795a670 (patch) | |
tree | 1f2305261b605aae31e5f8737ffcb275986baf1e /src/core/print_view_manager_qt.cpp | |
parent | 448478729cfdf5098dd24a6a870bacdbcd8cf9a7 (diff) |
Adaptations for Chromium 63
Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/print_view_manager_qt.cpp')
-rw-r--r-- | src/core/print_view_manager_qt.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp index 2e10a6f7d..5198985d7 100644 --- a/src/core/print_view_manager_qt.cpp +++ b/src/core/print_view_manager_qt.cpp @@ -249,8 +249,8 @@ bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout, bool , web_contents()->GetRenderViewHost()->GetWebkitPreferences().should_print_backgrounds); m_printSettings->SetInteger(printing::kSettingColor, printInColor ? printing::COLOR : printing::GRAYSCALE); - return Send(new PrintMsg_InitiatePrintPreview( - web_contents()->GetMainFrame()->GetRoutingID(), false)); + return web_contents()->GetMainFrame()->Send( + new PrintMsg_InitiatePrintPreview(web_contents()->GetMainFrame()->GetRoutingID(), false)); } #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) @@ -273,10 +273,8 @@ bool PrintViewManagerQt::OnMessageReceived(const IPC::Message& message, content: bool handled = true; IPC_BEGIN_MESSAGE_MAP(PrintViewManagerQt, message) IPC_MESSAGE_HANDLER(PrintHostMsg_DidShowPrintDialog, OnDidShowPrintDialog) - IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, - OnRequestPrintPreview) - IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting, - OnMetafileReadyForPrinting); + IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, OnRequestPrintPreview) + IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting, OnMetafileReadyForPrinting); IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled || PrintManager::OnMessageReceived(message, render_frame_host); @@ -293,10 +291,11 @@ void PrintViewManagerQt::resetPdfState() // IPC handlers void PrintViewManagerQt::OnRequestPrintPreview( - const PrintHostMsg_RequestPrintPreview_Params& params) + const PrintHostMsg_RequestPrintPreview_Params &/*params*/) { - Send(new PrintMsg_PrintPreview( - web_contents()->GetMainFrame()->GetRoutingID(), *m_printSettings)); + auto *rfh = web_contents()->GetMainFrame(); + rfh->Send(new PrintMsg_PrintPreview(rfh->GetRoutingID(), *m_printSettings)); + rfh->Send(new PrintMsg_ClosePrintPreviewDialog(rfh->GetRoutingID())); } void PrintViewManagerQt::OnMetafileReadyForPrinting( |