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

Unified Diff: printing/printing_context_mac.mm

Issue 7817013: PrintPreview: Added code to identify the printer default duplex value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test failures Created 9 years, 4 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
Index: printing/printing_context_mac.mm
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index f839802bd3ea7f7993aedad19aab022c7395ae35..8a27e1b3da98caa602dbcfeefa09259bdeff2563 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -111,14 +111,17 @@ PrintingContext::Result PrintingContextMac::UpdatePrinterSettings(
bool landscape;
bool print_to_pdf;
int copies;
- int duplex_mode;
+ DictionaryValue* duplex_info;
+ int user_selected_duplex_value;
std::string device_name;
if (!job_settings.GetBoolean(kSettingLandscape, &landscape) ||
!job_settings.GetBoolean(kSettingCollate, &collate) ||
!job_settings.GetBoolean(kSettingColor, &color) ||
!job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) ||
- !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) ||
+ !job_settings.GetDictionary(kSettingDuplexModeInfo, &duplex_info) ||
+ !duplex_info->GetInteger(kUserSelectedDuplexValue,
+ &user_selected_duplex_value) ||
!job_settings.GetInteger(kSettingCopies, &copies) ||
!job_settings.GetString(kSettingDeviceName, &device_name)) {
return OnError();
@@ -137,7 +140,7 @@ PrintingContext::Result PrintingContextMac::UpdatePrinterSettings(
return OnError();
if (!SetDuplexModeInPrintSettings(
- static_cast<DuplexMode>(duplex_mode))) {
+ static_cast<DuplexMode>(user_selected_duplex_value))) {
return OnError();
}

Powered by Google App Engine
This is Rietveld 408576698