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

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: Fixed nits 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..dc02ab02855e59682011e5caa80272ad69b8ee2b 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.COLOR = 2;
+ this.CMYK = 3; // cmyk - Cyan, magenta, yellow, black
+ 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_;
},
/**
@@ -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);
« no previous file with comments | « chrome/browser/printing/print_dialog_gtk.cc ('k') | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698