mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add print preview support (see issue #123)
Pass the `--enable-print-preview` command-line flag to enable. Currently only supported on Windows and Linux.
This commit is contained in:
committed by
Marshall Greenblatt
parent
cf87c88b05
commit
1669c0afbd
@@ -24,4 +24,22 @@ bool PdfExtensionEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
bool PrintPreviewEnabled() {
|
||||
#if defined(OS_MACOSX)
|
||||
// Not currently supported on macOS.
|
||||
return false;
|
||||
#else
|
||||
if (!PdfExtensionEnabled())
|
||||
return false;
|
||||
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kDisablePrintPreview)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kEnablePrintPreview);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
Reference in New Issue
Block a user