summaryrefslogtreecommitdiffstats
path: root/pdf/out_of_process_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/out_of_process_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/out_of_process_instance.cc')
-rw-r--r--pdf/out_of_process_instance.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index ef83cd9..ee4cd9f 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -603,6 +603,8 @@ void OutOfProcessInstance::DidChangeView(const pp::View& view) {
void OutOfProcessInstance::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();
}
@@ -1183,7 +1185,7 @@ void OutOfProcessInstance::DocumentLoadFailed() {
// Send a progress value of -1 to indicate a failure.
pp::VarDictionary message;
message.Set(pp::Var(kType), pp::Var(kJSLoadProgressType));
- message.Set(pp::Var(kJSProgressPercentage), pp::Var(-1)) ;
+ message.Set(pp::Var(kJSProgressPercentage), pp::Var(-1));
PostMessage(message);
}
@@ -1250,7 +1252,7 @@ void OutOfProcessInstance::DocumentLoadProgress(uint32 available,
last_progress_sent_ = progress;
pp::VarDictionary message;
message.Set(pp::Var(kType), pp::Var(kJSLoadProgressType));
- message.Set(pp::Var(kJSProgressPercentage), pp::Var(progress)) ;
+ message.Set(pp::Var(kJSProgressPercentage), pp::Var(progress));
PostMessage(message);
}
}