Use new PrintViewManagerBase::PrintToPdf method (fixes issue #3377)

This commit is contained in:
Marshall Greenblatt
2022-10-12 17:53:06 -04:00
parent 485f0b9caf
commit 25c75c5fc4
29 changed files with 324 additions and 753 deletions

View File

@@ -6,9 +6,11 @@
#include "libcef/browser/views/view_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
#include "chrome/common/pref_names.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
@@ -117,6 +119,11 @@ CefEventHandle CefBrowserPlatformDelegateChrome::GetEventHandle(
return native_delegate_->GetEventHandle(event);
}
bool CefBrowserPlatformDelegateChrome::IsPrintPreviewSupported() const {
return chrome_browser_ && !chrome_browser_->profile()->GetPrefs()->GetBoolean(
prefs::kPrintPreviewDisabled);
}
CefWindowHandle CefBrowserPlatformDelegateChrome::GetParentWindowHandle()
const {
return GetHostWindowHandle();