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

Unified Diff: chrome/browser/resources/print_preview/color_settings.js

Issue 7826040: PrintPreview: Fixed RICOH MP C3501 color print job issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix conflicts Created 9 years, 3 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: chrome/browser/resources/print_preview/color_settings.js
diff --git a/chrome/browser/resources/print_preview/color_settings.js b/chrome/browser/resources/print_preview/color_settings.js
index c0547e90ea43ab39f624f49f7b67f88841a6cbfc..bf5cedb998243fae66ecab539ff6ddc42a5c2f54 100644
--- a/chrome/browser/resources/print_preview/color_settings.js
+++ b/chrome/browser/resources/print_preview/color_settings.js
@@ -14,6 +14,10 @@ cr.define('print_preview', function() {
this.colorOption_ = $('color-option');
this.colorRadioButton_ = $('color');
this.bwRadioButton_ = $('bw');
+ this.GRAY = 1;
+ this.CMYK = 3; // cmyk - Cyan, magenta, yellow, black
vandebo (ex-Chrome) 2011/09/04 17:24:39 nit: two spaces before an inline comment.
kmadhusu 2011/09/05 17:37:20 Done.
+ this.COLOR = 2;
vandebo (ex-Chrome) 2011/09/04 17:24:39 nit: put these in numerical order - gray, color, c
kmadhusu 2011/09/05 17:37:20 Done.
+ this.printerColorModelForColor_ = this.COLOR;
}
cr.addSingletonGetter(ColorSettings);
@@ -36,11 +40,13 @@ cr.define('print_preview', function() {
},
/**
- * Checks whether |this.colorRadioButton_| is checked.
- * @return {boolean} true if |this.colorRadioButton_| is checked.
+ * Returns the color mode for print preview.
+ * @return {Number} Returns the printer color space
*/
- isColor: function() {
- return this.colorRadioButton_.checked;
+ get colorMode() {
+ if (this.bwRadioButton_.checked)
+ return this.GRAY;
+ return this.printerColorModelForColor_;
dpapad 2011/09/04 04:55:16 Nit (optional): return this.bwRadioButton_.checked
vandebo (ex-Chrome) 2011/09/04 17:24:39 There's no particular reason to use a tristate her
},
/**
@@ -71,6 +77,8 @@ cr.define('print_preview', function() {
this.colorOption_.setAttribute('aria-hidden', disableColorOption);
var setColorAsDefault = e.printerCapabilities.setColorAsDefault;
+ this.printerColorModelForColor_ =
+ e.printerCapabilities.printerColorModelForColor;
this.colorRadioButton_.checked = setColorAsDefault;
this.bwRadioButton_.checked = !setColorAsDefault;
setColor(this.colorRadioButton_.checked);

Powered by Google App Engine
This is Rietveld 408576698