Index: chrome/browser/resources/print_preview/native_layer.js |
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js |
index 8c72a538284ac3e98bdaeda005022f06bf5b9754..43e098f4c9e5afa7f4727ef44f17ce40663e40b4 100644 |
--- a/chrome/browser/resources/print_preview/native_layer.js |
+++ b/chrome/browser/resources/print_preview/native_layer.js |
@@ -255,6 +255,7 @@ cr.define('print_preview', function() { |
'landscape': printTicketStore.landscape.getValue(), |
'color': this.getNativeColorModel_(destination, printTicketStore.color), |
'headerFooterEnabled': printTicketStore.headerFooter.getValue(), |
+ 'printFriendly': printTicketStore.printFriendly.getValue(), |
'marginsType': printTicketStore.marginsType.getValue(), |
'isFirstRequest': requestId == 0, |
'requestID': requestId, |
@@ -467,7 +468,8 @@ cr.define('print_preview', function() { |
initialSettings['documentHasSelection'] || false, |
initialSettings['shouldPrintSelectionOnly'] || false, |
initialSettings['printerName'] || null, |
- initialSettings['appState'] || null); |
+ initialSettings['appState'] || null, |
+ initialSettings['printFriendlyEnabled'] || false); |
var initialSettingsSetEvent = new Event( |
NativeLayer.EventType.INITIAL_SETTINGS_SET); |
@@ -860,6 +862,8 @@ cr.define('print_preview', function() { |
* @param {?string} systemDefaultDestinationId ID of the system default |
* destination. |
* @param {?string} serializedAppStateStr Serialized app state. |
+ * @param {boolean} printFriendlyEnabled Whether the print friendly setting is |
+ * enabled. |
* @constructor |
*/ |
function NativeInitialSettings( |
@@ -874,7 +878,8 @@ cr.define('print_preview', function() { |
documentHasSelection, |
selectionOnly, |
systemDefaultDestinationId, |
- serializedAppStateStr) { |
+ serializedAppStateStr, |
+ printFriendlyEnabled) { |
/** |
* Whether the print preview should be in auto-print mode. |
@@ -959,6 +964,13 @@ cr.define('print_preview', function() { |
* @private |
*/ |
this.serializedAppStateStr_ = serializedAppStateStr; |
+ |
+ /** |
+ * Whether the print friendly setting is enabled. |
+ * @type {boolean} |
+ * @private |
+ */ |
+ this.printFriendlyEnabled_ = printFriendlyEnabled; |
}; |
NativeInitialSettings.prototype = { |
@@ -1031,7 +1043,15 @@ cr.define('print_preview', function() { |
/** @return {?string} Serialized app state. */ |
get serializedAppStateStr() { |
return this.serializedAppStateStr_; |
- } |
+ }, |
+ |
+ /** |
+ * @return {boolean} Whether the print friendly setting is enabled. |
+ */ |
+ get printFriendlyEnabled() { |
+ return this.printFriendlyEnabled_; |
+ }, |
+ |
}; |
// Export |