From 4274861a828d85d3360d70f54bc3017f87f17502 Mon Sep 17 00:00:00 2001 From: "kmadhusu@chromium.org" Date: Fri, 3 Jun 2011 19:27:00 +0000 Subject: PrintPreview: Modified PrintingContextMac code to use the copy of sharedPrintInfo object. BUG=82739 TEST=Please refer to bug report. Review URL: http://codereview.chromium.org/7074051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87828 0039d316-1c4b-4281-b951-d872f2087c98 --- printing/printing_context_mac.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'printing/printing_context_mac.h') diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h index 84a5c05..af6f9f6 100644 --- a/printing/printing_context_mac.h +++ b/printing/printing_context_mac.h @@ -42,12 +42,16 @@ class PrintingContextMac : public PrintingContext { virtual gfx::NativeDrawingContext context() const; private: - // Read the settings from the given NSPrintInfo (and cache it for later use). - void ParsePrintInfo(NSPrintInfo* print_info); - - // Initializes PrintSettings from native print info object. + // Initializes PrintSettings from |print_info_|. This must be called + // after changes to |print_info_| in order for the changes to take effect in + // printing. + // This function ignores the page range information specified in the print + // info object and use |ranges| instead. void InitPrintSettingsFromPrintInfo(const PageRanges& ranges); + // Returns the set of page ranges constructed from |print_info_|. + PageRanges GetPageRangesFromPrintInfo(); + // Updates |print_info_| to use the given printer. // Returns true if the printer was set else returns false. bool SetPrinter(const std::string& device_name); -- cgit v1.1