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
@@ -27,6 +27,7 @@
|
||||
#include "chrome/browser/font_family_cache.h"
|
||||
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
|
||||
#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "components/guest_view/browser/guest_view_manager.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
@@ -740,3 +741,19 @@ network::mojom::NetworkContext* CefBrowserContext::GetNetworkContext() {
|
||||
DCHECK(net_service::IsEnabled());
|
||||
return GetDefaultStoragePartition(this)->GetNetworkContext();
|
||||
}
|
||||
|
||||
DownloadPrefs* CefBrowserContext::GetDownloadPrefs() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!download_prefs_) {
|
||||
download_prefs_.reset(new DownloadPrefs(this));
|
||||
}
|
||||
return download_prefs_.get();
|
||||
}
|
||||
|
||||
bool CefBrowserContext::IsPrintPreviewSupported() const {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!extensions::PrintPreviewEnabled())
|
||||
return false;
|
||||
|
||||
return !GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled);
|
||||
}
|
||||
|
Reference in New Issue
Block a user