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:
Ananyo Maiti
2019-07-17 14:47:27 -04:00
committed by Marshall Greenblatt
parent cf87c88b05
commit 1669c0afbd
49 changed files with 1098 additions and 1425 deletions

View File

@@ -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);
};