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
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "chrome/browser/download/download_prefs.h"
|
||||
#include "components/proxy_config/pref_proxy_config_tracker.h"
|
||||
#include "components/visitedlink/browser/visitedlink_delegate.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
@@ -257,6 +258,12 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
return url_request_getter_;
|
||||
}
|
||||
|
||||
// Called from DownloadPrefs::FromBrowserContext.
|
||||
DownloadPrefs* GetDownloadPrefs();
|
||||
|
||||
// Returns true if this context supports print preview.
|
||||
bool IsPrintPreviewSupported() const;
|
||||
|
||||
private:
|
||||
// Allow deletion via std::unique_ptr().
|
||||
friend std::default_delete<CefBrowserContext>;
|
||||
@@ -292,6 +299,8 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
// SimpleKeyedServiceFactory.
|
||||
std::unique_ptr<ProfileKey> key_;
|
||||
|
||||
std::unique_ptr<DownloadPrefs> download_prefs_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserContext);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user