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

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

Issue 7358002: Print Preview: Refactoring layout mode related logic to LayoutSettings class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving function within CopiesSettings Created 9 years, 5 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/copies_settings.js
diff --git a/chrome/browser/resources/print_preview/copies_settings.js b/chrome/browser/resources/print_preview/copies_settings.js
index 72893b6cad693fca74e50f0093a8ec9a0349e48e..df18c487bc952d9ba530b74a4ee8645b6ea9ec16 100644
--- a/chrome/browser/resources/print_preview/copies_settings.js
+++ b/chrome/browser/resources/print_preview/copies_settings.js
@@ -54,6 +54,18 @@ cr.define('print_preview', function() {
},
/**
+ * Gets the duplex mode for printing.
+ * @return {number} duplex mode.
+ */
+ get duplexMode() {
+ // Constant values matches printing::DuplexMode enum. Not using const
+ // keyword because it is not allowed by JS strict mode.
+ var SIMPLEX = 0;
+ var LONG_EDGE = 1;
+ return !this.twoSidedCheckbox_.checked ? SIMPLEX : LONG_EDGE;
+ },
+
+ /**
* @return {boolean} true if |this.textfield_| is empty, or represents a
* positive integer value.
*/

Powered by Google App Engine
This is Rietveld 408576698