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

Unified Diff: chrome/browser/resources/print_preview/data/print_ticket_store.js

Issue 12209086: Page range comparisons should use document size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/data/print_ticket_store.js
diff --git a/chrome/browser/resources/print_preview/data/print_ticket_store.js b/chrome/browser/resources/print_preview/data/print_ticket_store.js
index b8850d442c1b5e424121b8ff508aa68e8f2da77c..14e924d0ce2ab8d9cf57f2d7702f45ba418b80c8 100644
--- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
+++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
@@ -51,7 +51,7 @@ cr.define('print_preview', function() {
*/
this.documentInfo_ = new print_preview.DocumentInfo();
this.documentInfo_.isModifiable = true;
- this.documentInfo_.pageCount = 1;
+ this.documentInfo_.pageCount = 0;
this.documentInfo_.pageSize = initialPageSize;
this.documentInfo_.printableArea = new print_preview.PrintableArea(
new print_preview.Coordinate2d(0, 0), initialPageSize);
@@ -593,6 +593,23 @@ cr.define('print_preview', function() {
},
/**
+ * @return {!Array.<object.<{from: number, to: number}>>} Page ranges
+ * represented by of the page range string.
+ */
+ getPageRanges: function() {
+ return this.pageRange_.getPageRanges();
+ },
+
+ /**
+ * @return {!Array.<object.<{from: number, to: number}>>} Page ranges
+ * represented by of the page range string and constraied by ducument
+ * page count.
+ */
+ getDocumentPageRanges: function() {
+ return this.pageRange_.getDocumentPageRanges();
+ },
+
+ /**
* @return {!print_preview.PageNumberSet} Page number set specified by the
* string representation of the page range string.
*/

Powered by Google App Engine
This is Rietveld 408576698