| 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 66414b45a8b12054c3e498ad6bfc62c6fc5d5bc1..f24b97afdcd3c551a7d57feba9a639fac74c672d 100644
|
| --- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| +++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
|
| @@ -185,6 +185,16 @@ cr.define('print_preview', function() {
|
| new print_preview.ticket_items.SelectionOnly(this.documentInfo_);
|
|
|
| /**
|
| + * Print friendly ticket item.
|
| + * @type {!print_preview.ticket_items.PrintFriendly}
|
| + * @private
|
| + */
|
| + this.printFriendly_ = new print_preview.ticket_items.PrintFriendly(
|
| + this.appState_,
|
| + this.documentInfo_,
|
| + this.selectionOnly_);
|
| +
|
| + /**
|
| * Vendor ticket items.
|
| * @type {!print_preview.ticket_items.VendorItems}
|
| * @private
|
| @@ -267,6 +277,10 @@ cr.define('print_preview', function() {
|
| return this.headerFooter_;
|
| },
|
|
|
| + get printFriendly() {
|
| + return this.printFriendly_;
|
| + },
|
| +
|
| get mediaSize() {
|
| return this.mediaSize_;
|
| },
|
| @@ -307,12 +321,15 @@ cr.define('print_preview', function() {
|
| * of the local measurement system.
|
| * @param {boolean} selectionOnly Whether only selected content should be
|
| * printed.
|
| + * @param {boolean} printFriendlyEnabled Whether print friendly is enabled.
|
| */
|
| init: function(
|
| - thousandsDelimeter, decimalDelimeter, unitType, selectionOnly) {
|
| + thousandsDelimeter, decimalDelimeter, unitType,
|
| + selectionOnly, printFriendlyEnabled) {
|
| this.measurementSystem_.setSystem(thousandsDelimeter, decimalDelimeter,
|
| unitType);
|
| this.selectionOnly_.updateValue(selectionOnly);
|
| + this.printFriendly_.setIsCapabilityAvailable(printFriendlyEnabled);
|
|
|
| // Initialize ticket with user's previous values.
|
| if (this.appState_.hasField(
|
| @@ -362,6 +379,12 @@ cr.define('print_preview', function() {
|
| print_preview.AppState.Field.IS_HEADER_FOOTER_ENABLED)));
|
| }
|
| if (this.appState_.hasField(
|
| + print_preview.AppState.Field.IS_PRINT_FRIENDLY_ENABLED)) {
|
| + this.printFriendly.updateValue(
|
| + /** @type {!Object} */(this.appState_.getField(
|
| + print_preview.AppState.Field.IS_PRINT_FRIENDLY_ENABLED)));
|
| + }
|
| + if (this.appState_.hasField(
|
| print_preview.AppState.Field.IS_COLLATE_ENABLED)) {
|
| this.collate_.updateValue(
|
| /** @type {!Object} */(this.appState_.getField(
|
|
|