From 4e7ee5a2c18dfb2f0a0a4faf57d955f5dc3bb3c3 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Fri, 18 Oct 2013 03:13:35 +0000 Subject: Print Preview: Save the CUPS printer color model info and use it when printing. BUG=306682 Review URL: https://codereview.chromium.org/26539013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229293 0039d316-1c4b-4281-b951-d872f2087c98 --- printing/backend/cups_helper.cc | 2 ++ printing/backend/print_backend.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'printing') diff --git a/printing/backend/cups_helper.cc b/printing/backend/cups_helper.cc index eb49ca4..74df558 100644 --- a/printing/backend/cups_helper.cc +++ b/printing/backend/cups_helper.cc @@ -386,6 +386,8 @@ bool ParsePpdCapabilities( (cm_black != UNKNOWN_COLOR_MODEL) && (cm_color != cm_black)); caps.color_default = is_color; + caps.color_model = cm_color; + caps.bw_model = cm_black; ppdClose(ppd); base::DeleteFile(ppd_file_path, false); diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h index 506bf07..1d058bf 100644 --- a/printing/backend/print_backend.h +++ b/printing/backend/print_backend.h @@ -42,6 +42,11 @@ struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults { bool color_changeable; bool duplex_capable; +#if defined(USE_CUPS) + ColorModel color_model; + ColorModel bw_model; +#endif + // Current defaults. bool color_default; DuplexMode duplex_default; -- cgit v1.1