Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: chrome/browser/printing/print_job.h

Issue 2271743003: Win: Fix printing selected pages with native dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job.h
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index 4706084bff1dc6be32b2492733d5fcb168249003..b83a5a74779cb4831f2235e9a04daa802d2427e5 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -6,17 +6,15 @@
#define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
#include <memory>
+#include <vector>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "build/build_config.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-class Thread;
-
namespace base {
class RefCountedMemory;
}
@@ -93,17 +91,20 @@ class PrintJob : public PrintJobWorkerOwner,
PrintedDocument* document() const;
#if defined(OS_WIN)
+ // Let the PrintJob know the 0-based |page_number| of a given printed page.
+ void AppendPrintedPage(int page_number);
+
void StartPdfToEmfConversion(
const scoped_refptr<base::RefCountedMemory>& bytes,
const gfx::Size& page_size,
const gfx::Rect& content_area);
-#endif // OS_WIN
+#endif // defined(OS_WIN)
protected:
~PrintJob() override;
private:
- // Updates document_ to a new instance.
+ // Updates |document_| to a new instance.
void UpdatePrintedDocument(PrintedDocument* new_document);
// Processes a NOTIFY_PRINT_JOB_EVENT notification.
@@ -127,7 +128,7 @@ class PrintJob : public PrintJobWorkerOwner,
void OnPdfToEmfPageConverted(int page_number,
float scale_factor,
std::unique_ptr<MetafilePlayer> emf);
-#endif // OS_WIN
+#endif // defined(OS_WIN)
content::NotificationRegistrar registrar_;
@@ -155,8 +156,9 @@ class PrintJob : public PrintJobWorkerOwner,
#if defined(OS_WIN)
class PdfToEmfState;
- std::unique_ptr<PdfToEmfState> ptd_to_emf_state_;
-#endif // OS_WIN
+ std::unique_ptr<PdfToEmfState> pdf_to_emf_state_;
+ std::vector<int> pdf_page_mapping_;
+#endif // defined(OS_WIN)
// Used at shutdown so that we can quit a nested message loop.
base::WeakPtrFactory<PrintJob> quit_factory_;
« no previous file with comments | « no previous file | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698