summaryrefslogtreecommitdiffstats
path: root/pdf/instance.cc
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-03-05 13:06:02 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-05 21:07:12 +0000
commitb335e7d621465955cf8b733660f82ffe0aab6de2 (patch)
treec1bb8f6fa3a2cc37147bf82b54d937e8e08ecb39 /pdf/instance.cc
parentc285abaea4ed9dbe8c9dcc285d6d4acc8676cd2f (diff)
downloadchromium_src-b335e7d621465955cf8b733660f82ffe0aab6de2.zip
chromium_src-b335e7d621465955cf8b733660f82ffe0aab6de2.tar.gz
chromium_src-b335e7d621465955cf8b733660f82ffe0aab6de2.tar.bz2
Print Preview: Support the duplex preset in PDFs.
The preset from the PDF document gets plumbed all the way to print preview, but the ShortEdge setting is ignored at the end because print preview does not support it yet. BUG=169120 Review URL: https://codereview.chromium.org/974183003 Cr-Commit-Position: refs/heads/master@{#319324}
Diffstat (limited to 'pdf/instance.cc')
-rw-r--r--pdf/instance.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 93daf6f..724f7d6 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -674,6 +674,8 @@ pp::Var Instance::GetInstanceObject() {
void Instance::GetPrintPresetOptionsFromDocument(
PP_PdfPrintPresetOptions_Dev* options) {
options->is_scaling_disabled = PP_FromBool(IsPrintScalingDisabled());
+ options->duplex =
+ static_cast<PP_PrivateDuplexMode_Dev>(engine_->GetDuplexType());
options->copies = engine_->GetCopiesToPrint();
}