mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use new PrintViewManagerBase::PrintToPdf method (fixes issue #3377)
This commit is contained in:
@ -13,7 +13,6 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "chrome/browser/printing/print_view_manager_common.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_commands.h"
|
||||
@ -185,30 +184,6 @@ void ChromeBrowserHostImpl::SetZoomLevel(double zoomLevel) {
|
||||
NOTIMPLEMENTED();
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::Print() {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(&ChromeBrowserHostImpl::Print, this));
|
||||
return;
|
||||
}
|
||||
|
||||
if (browser_) {
|
||||
// Like chrome::Print() but specifying the WebContents.
|
||||
printing::StartPrint(GetWebContents(),
|
||||
/*print_renderer=*/mojo::NullAssociatedRemote(),
|
||||
browser_->profile()->GetPrefs()->GetBoolean(
|
||||
prefs::kPrintPreviewDisabled),
|
||||
/*has_selection=*/false);
|
||||
}
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::PrintToPDF(
|
||||
const CefString& path,
|
||||
const CefPdfPrintSettings& settings,
|
||||
CefRefPtr<CefPdfPrintCallback> callback) {
|
||||
NOTIMPLEMENTED();
|
||||
callback->OnPdfPrintFinished(CefString(), false);
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::Find(const CefString& searchText,
|
||||
bool forward,
|
||||
bool matchCase,
|
||||
|
Reference in New Issue
Block a user