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

Unified Diff: pdf/out_of_process_instance.cc

Issue 974183003: Print Preview: Support the duplex preset in PDFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez comments Created 5 years, 10 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 | « pdf/instance.cc ('k') | pdf/pdf_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index ef83cd99ba2d002695b0ef110025abe0742489a8..ee4cd9fa1a6e1843ce457d711a4c37f21891ffe7 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);
}
}
« no previous file with comments | « pdf/instance.cc ('k') | pdf/pdf_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698