| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 // TODO(rltoscano): Maybe clear print ticket when destination changes. Or | 8 // TODO(rltoscano): Maybe clear print ticket when destination changes. Or |
| 9 // better yet, carry over any print ticket state that is possible. I.e. if | 9 // better yet, carry over any print ticket state that is possible. I.e. if |
| 10 // destination changes, the new destination might not support duplex anymore, | 10 // destination changes, the new destination might not support duplex anymore, |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 }, | 247 }, |
| 248 | 248 |
| 249 /** | 249 /** |
| 250 * @return {print_preview.Margins} Document margins of the currently | 250 * @return {print_preview.Margins} Document margins of the currently |
| 251 * generated preview. | 251 * generated preview. |
| 252 */ | 252 */ |
| 253 getDocumentMargins: function() { | 253 getDocumentMargins: function() { |
| 254 return this.documentInfo_.margins; | 254 return this.documentInfo_.margins; |
| 255 }, | 255 }, |
| 256 | 256 |
| 257 /** @return {string} Title of the document. */ |
| 258 getDocumentTitle: function() { |
| 259 return this.documentInfo_.title; |
| 260 }, |
| 261 |
| 257 /** | 262 /** |
| 258 * Initializes the print ticket store. Dispatches an INITIALIZE event. | 263 * Initializes the print ticket store. Dispatches an INITIALIZE event. |
| 259 * @param {boolean} isDocumentModifiable Whether the document to print is | 264 * @param {boolean} isDocumentModifiable Whether the document to print is |
| 260 * modifiable (i.e. can be re-flowed by Chromium). | 265 * modifiable (i.e. can be re-flowed by Chromium). |
| 261 * @param {string} documentTitle Title of the document to print. | 266 * @param {string} documentTitle Title of the document to print. |
| 262 * @param {string} thousandsDelimeter Delimeter of the thousands place. | 267 * @param {string} thousandsDelimeter Delimeter of the thousands place. |
| 263 * @param {string} decimalDelimeter Delimeter of the decimal point. | 268 * @param {string} decimalDelimeter Delimeter of the decimal point. |
| 264 * @param {!print_preview.MeasurementSystem.UnitType} unitType Type of unit | 269 * @param {!print_preview.MeasurementSystem.UnitType} unitType Type of unit |
| 265 * of the local measurement system. | 270 * of the local measurement system. |
| 266 */ | 271 */ |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 this, PrintTicketStore.EventType.CAPABILITIES_CHANGE); | 664 this, PrintTicketStore.EventType.CAPABILITIES_CHANGE); |
| 660 } | 665 } |
| 661 } | 666 } |
| 662 }; | 667 }; |
| 663 | 668 |
| 664 // Export | 669 // Export |
| 665 return { | 670 return { |
| 666 PrintTicketStore: PrintTicketStore | 671 PrintTicketStore: PrintTicketStore |
| 667 }; | 672 }; |
| 668 }); | 673 }); |
| OLD | NEW |