linux: Fix callbacks to CefPrintHandler (fixes #3729)
Out-of-process printing must also be disabled by passing `--disable-features=EnableOopPrintDrivers`.
This commit is contained in:
parent
7268dc8cd3
commit
48f3ef63e2
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#if BUILDFLAG(IS_LINUX)
|
#if BUILDFLAG(IS_LINUX)
|
||||||
#include "base/linux_util.h"
|
#include "base/linux_util.h"
|
||||||
|
#include "cef/libcef/browser/printing/print_dialog_linux.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
|
@ -83,4 +84,11 @@ void ChromeBrowserMainExtraPartsCef::ToolkitInitialized() {
|
||||||
// Override the default Chrome client.
|
// Override the default Chrome client.
|
||||||
SetConstrainedWindowViewsClient(CreateAlloyConstrainedWindowViewsClient(
|
SetConstrainedWindowViewsClient(CreateAlloyConstrainedWindowViewsClient(
|
||||||
CreateChromeConstrainedWindowViewsClient()));
|
CreateChromeConstrainedWindowViewsClient()));
|
||||||
|
|
||||||
|
#if BUILDFLAG(IS_LINUX)
|
||||||
|
auto printing_delegate = new CefPrintingContextLinuxDelegate();
|
||||||
|
auto default_delegate =
|
||||||
|
ui::PrintingContextLinuxDelegate::SetInstance(printing_delegate);
|
||||||
|
printing_delegate->SetDefaultDelegate(default_delegate);
|
||||||
|
#endif // BUILDFLAG(IS_LINUX)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue