diff options
Diffstat (limited to 'chrome/browser/resources/print_preview/native_layer.js')
-rw-r--r-- | chrome/browser/resources/print_preview/native_layer.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js index 712bf42..cc9c1c99 100644 --- a/chrome/browser/resources/print_preview/native_layer.js +++ b/chrome/browser/resources/print_preview/native_layer.js @@ -134,7 +134,7 @@ cr.define('print_preview', function() { printTicketStore.getPageNumberSet().getPageRanges() : []; var ticket = { - 'pageRange': pageRanges, // pageRanges, + 'pageRange': pageRanges, 'landscape': printTicketStore.isLandscapeEnabled(), 'color': printTicketStore.isColorEnabled() ? NativeLayer.ColorMode_.COLOR : NativeLayer.ColorMode_.GRAY, @@ -161,6 +161,11 @@ cr.define('print_preview', function() { 'collate': printTicketStore.isCollateEnabled() }; + // Set 'cloudPrintID' only if the destination is not local. + if (!destination.isLocal) { + ticket['cloudPrintID'] = destination.id; + } + if (printTicketStore.hasMarginsCapability() && printTicketStore.getMarginsType() == print_preview.ticket_items.MarginsType.Value.CUSTOM) { @@ -354,6 +359,7 @@ cr.define('print_preview', function() { numberFormatSymbols[1] || '.', unitType, initialSettings['previewModifiable'] || false, + initialSettings['initiatorTabTitle'] || '', marginsType, customMargins, initialSettings['duplex'] || false, @@ -570,6 +576,7 @@ cr.define('print_preview', function() { * local machine's measurement system. * @param {boolean} isDocumentModifiable Whether the document to print is * modifiable. + * @param {string} documentTitle Title of the document. * @param {print_preview.ticket_items.MarginsType.Value} marginsType Initial * margins type. * @param {print_preview.Margins} customMargins Initial custom margins. @@ -586,6 +593,7 @@ cr.define('print_preview', function() { decimalDelimeter, unitType, isDocumentModifiable, + documentTitle, marginsType, customMargins, isDuplexEnabled, @@ -628,6 +636,13 @@ cr.define('print_preview', function() { this.isDocumentModifiable_ = isDocumentModifiable; /** + * Title of the document. + * @type {string} + * @private + */ + this.documentTitle_ = documentTitle; + + /** * Initial margins type. * @type {print_preview.ticket_items.MarginsType.Value} * @private @@ -694,6 +709,11 @@ cr.define('print_preview', function() { return this.isDocumentModifiable_; }, + /** @return {string} Document title. */ + get documentTitle() { + return this.documentTitle_; + }, + /** * @return {print_preview.ticket_items.MarginsType.Value} Initial margins * type or {@code null} if not initially set. |