summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 22:04:34 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 22:04:34 +0000
commit29e472fa1c7ed8e691dd8e3e3c9de456d5420d60 (patch)
tree4e4f90b29bee88e0c2430e1ed153ee7f29982425 /printing
parente4fb5d3b2b37fe91d92a1dc76ef1fab12cf97264 (diff)
downloadchromium_src-29e472fa1c7ed8e691dd8e3e3c9de456d5420d60.zip
chromium_src-29e472fa1c7ed8e691dd8e3e3c9de456d5420d60.tar.gz
chromium_src-29e472fa1c7ed8e691dd8e3e3c9de456d5420d60.tar.bz2
PrintPreview: [MAC]Update only the orientation settings, if the selected printer is "PrintToPDF".
BUG=none TEST= Enable print preview. Preview a webpage. Select the destination printer as "PrintToPDF". Observe the preview data. Review URL: http://codereview.chromium.org/6930024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/printing_context_mac.mm26
1 files changed, 15 insertions, 11 deletions
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index 416a968..a8e4fa0 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -109,22 +109,26 @@ PrintingContext::Result PrintingContextMac::UpdatePrintSettings(
return OnError();
}
- if (!SetPrinter(device_name))
- return OnError();
+ if (!print_to_pdf) {
+ if (!SetPrinter(device_name))
+ return OnError();
- if (!SetCopiesInPrintSettings(copies))
- return OnError();
+ if (!SetCopiesInPrintSettings(copies))
+ return OnError();
- if (!SetCollateInPrintSettings(collate))
- return OnError();
+ if (!SetCollateInPrintSettings(collate))
+ return OnError();
- if (!SetOrientationIsLandscape(landscape))
- return OnError();
+ if (!SetDuplexModeInPrintSettings(
+ static_cast<DuplexMode>(duplex_mode))) {
+ return OnError();
+ }
- if (!SetDuplexModeInPrintSettings(static_cast<DuplexMode>(duplex_mode)))
- return OnError();
+ if (!SetOutputIsColor(color))
+ return OnError();
+ }
- if (!SetOutputIsColor(color))
+ if (!SetOrientationIsLandscape(landscape))
return OnError();
[print_info_.get() updateFromPMPrintSettings];