Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3007)

Unified Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698