summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-03-02 16:32:02 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-03-04 12:45:19 +0000
commit82b37e3d3e93e814f59550f5775e7b85bee19596 (patch)
tree61d0a240c17be9bdc2c63f78da763b2cc8f89e2b
parent107ed30ec505f20f166cf7df3b99c5c73a680796 (diff)
downloadqtwebengine-chromium-82b37e3d3e93e814f59550f5775e7b85bee19596.tar.gz
FIXUP: Fix printing sources for Qt and add them to the build.
Change-Id: Ie5a68323ad99257ee5dc3a6868e5e2d3b6a4bd80 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--chromium/chrome/browser/printing/print_job.h4
-rw-r--r--chromium/chrome/browser/printing/print_job_worker.cc2
2 files changed, 4 insertions, 2 deletions
diff --git a/chromium/chrome/browser/printing/print_job.h b/chromium/chrome/browser/printing/print_job.h
index a01cdef50d4..50a106dd51e 100644
--- a/chromium/chrome/browser/printing/print_job.h
+++ b/chromium/chrome/browser/printing/print_job.h
@@ -79,7 +79,8 @@ class PrintJob : public base::RefCountedThreadSafe<PrintJob> {
const std::u16string& name,
uint32_t page_count);
-#if defined(OS_WIN) && !defined(TOOLKIT_QT)
+#if defined(OS_WIN)
+#if !defined(TOOLKIT_QT)
void StartConversionToNativeFormat(
scoped_refptr<base::RefCountedMemory> print_data,
const gfx::Size& page_size,
@@ -92,6 +93,7 @@ class PrintJob : public base::RefCountedThreadSafe<PrintJob> {
// of pages, because all PDF pages will be converted, but only the user's
// selected pages should be sent to the printer. See https://crbug.com/823876.
void ResetPageMapping();
+#endif
// Called when |page| is done printing.
void OnPageDone(PrintedPage* page);
diff --git a/chromium/chrome/browser/printing/print_job_worker.cc b/chromium/chrome/browser/printing/print_job_worker.cc
index dddbc0ef291..8f0713963d8 100644
--- a/chromium/chrome/browser/printing/print_job_worker.cc
+++ b/chromium/chrome/browser/printing/print_job_worker.cc
@@ -421,7 +421,7 @@ void PrintJobWorker::OnNewPage() {
return;
bool do_spool_job = true;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(TOOLKIT_QT)
const bool source_is_pdf =
!print_job_->document()->settings().is_modifiable();
if (!features::ShouldPrintUsingXps(source_is_pdf)) {