summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-18 03:13:35 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-18 03:13:35 +0000
commit4e7ee5a2c18dfb2f0a0a4faf57d955f5dc3bb3c3 (patch)
treeeca988b7358f9e61a9277d55781f54036abeaab2 /printing
parente170ac778035f729456ffe113eb7bd63f159806f (diff)
downloadchromium_src-4e7ee5a2c18dfb2f0a0a4faf57d955f5dc3bb3c3.zip
chromium_src-4e7ee5a2c18dfb2f0a0a4faf57d955f5dc3bb3c3.tar.gz
chromium_src-4e7ee5a2c18dfb2f0a0a4faf57d955f5dc3bb3c3.tar.bz2
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
Diffstat (limited to 'printing')
-rw-r--r--printing/backend/cups_helper.cc2
-rw-r--r--printing/backend/print_backend.h5
2 files changed, 7 insertions, 0 deletions
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;