Chromium Code Reviews| 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 |
|
Toscano
2013/02/12 01:39:05
Let's have this return a print_preview.data.PageIn
Toscano
2013/02/12 01:39:05
You don't need "object" in the data type. This is
|
| + * 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() { |
|
Toscano
2013/02/12 01:39:05
What is this one used for?
Vitaly Buka (NO REVIEWS)
2013/02/12 01:45:30
Now native layer convert this into array of pages,
|
| + return this.pageRange_.getDocumentPageRanges(); |
| + }, |
| + |
| + /** |
| * @return {!print_preview.PageNumberSet} Page number set specified by the |
| * string representation of the page range string. |
| */ |