summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/print_preview
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 18:27:35 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 18:27:35 +0000
commita3ee735fe9feb7394231ad867ef42aaea45c011d (patch)
tree70814baf2d1347f04af1bbea1e4fa0302076e1f5 /chrome/browser/resources/print_preview
parentaf429e26b1e563788df8c7f07afcd93276d947bd (diff)
downloadchromium_src-a3ee735fe9feb7394231ad867ef42aaea45c011d.zip
chromium_src-a3ee735fe9feb7394231ad867ef42aaea45c011d.tar.gz
chromium_src-a3ee735fe9feb7394231ad867ef42aaea45c011d.tar.bz2
PrintPreview: Added code to honor the grayscale color model.
BUG=None TEST=Add a printer which supports grayscale and cmyk color models. Preview a color webpage. Observe that the color options is displayed to the user. Review URL: http://codereview.chromium.org/8280002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/print_preview')
-rw-r--r--chrome/browser/resources/print_preview/color_settings.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/resources/print_preview/color_settings.js b/chrome/browser/resources/print_preview/color_settings.js
index 9289c9f..f64616b 100644
--- a/chrome/browser/resources/print_preview/color_settings.js
+++ b/chrome/browser/resources/print_preview/color_settings.js
@@ -77,8 +77,12 @@ cr.define('print_preview', function() {
this.colorOption_.setAttribute('aria-hidden', disableColorOption);
var setColorAsDefault = e.printerCapabilities.setColorAsDefault;
- this.printerColorModelForColor_ =
- e.printerCapabilities.printerColorModelForColor;
+ if (e.printerCapabilities.printerColorModelForColor) {
+ this.printerColorModelForColor_ =
+ e.printerCapabilities.printerColorModelForColor;
+ } else {
+ this.printerColorModelForColor_ = ColorSettings.COLOR;
+ }
if (e.printerCapabilities.printerColorModelForBlack) {
this.printerColorModelForBlack_ =
e.printerCapabilities.printerColorModelForBlack;