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

Side by Side Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 661083003: Assume 1 collated copy for print preview generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.exportPath('print_preview'); 5 cr.exportPath('print_preview');
6 6
7 /** 7 /**
8 * @typedef {{selectSaveAsPdfDestination: boolean, 8 * @typedef {{selectSaveAsPdfDestination: boolean,
9 * layoutSettings.portrait: boolean, 9 * layoutSettings.portrait: boolean,
10 * pageRange: string, 10 * pageRange: string,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 'printWithCloudPrint': destination != null && !destination.isLocal, 237 'printWithCloudPrint': destination != null && !destination.isLocal,
238 'printWithPrivet': destination != null && destination.isPrivet, 238 'printWithPrivet': destination != null && destination.isPrivet,
239 'deviceName': destination == null ? 'foo' : destination.id, 239 'deviceName': destination == null ? 'foo' : destination.id,
240 'generateDraftData': documentInfo.isModifiable, 240 'generateDraftData': documentInfo.isModifiable,
241 'fitToPageEnabled': printTicketStore.fitToPage.getValue(), 241 'fitToPageEnabled': printTicketStore.fitToPage.getValue(),
242 242
243 // NOTE: Even though the following fields don't directly relate to the 243 // NOTE: Even though the following fields don't directly relate to the
244 // preview, they still need to be included. 244 // preview, they still need to be included.
245 'duplex': printTicketStore.duplex.getValue() ? 245 'duplex': printTicketStore.duplex.getValue() ?
246 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX, 246 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX,
247 'copies': printTicketStore.copies.getValueAsNumber(), 247 'copies': 1,
248 'collate': printTicketStore.collate.getValue(), 248 'collate': true,
249 'shouldPrintBackgrounds': printTicketStore.cssBackground.getValue(), 249 'shouldPrintBackgrounds': printTicketStore.cssBackground.getValue(),
250 'shouldPrintSelectionOnly': printTicketStore.selectionOnly.getValue() 250 'shouldPrintSelectionOnly': printTicketStore.selectionOnly.getValue()
251 }; 251 };
252 252
253 // Set 'cloudPrintID' only if the destination is not local. 253 // Set 'cloudPrintID' only if the destination is not local.
254 if (destination && !destination.isLocal) { 254 if (destination && !destination.isLocal) {
255 ticket['cloudPrintID'] = destination.id; 255 ticket['cloudPrintID'] = destination.id;
256 } 256 }
257 257
258 if (printTicketStore.marginsType.isCapabilityAvailable() && 258 if (printTicketStore.marginsType.isCapabilityAvailable() &&
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 return this.serializedAppStateStr_; 955 return this.serializedAppStateStr_;
956 } 956 }
957 }; 957 };
958 958
959 // Export 959 // Export
960 return { 960 return {
961 NativeInitialSettings: NativeInitialSettings, 961 NativeInitialSettings: NativeInitialSettings,
962 NativeLayer: NativeLayer 962 NativeLayer: NativeLayer
963 }; 963 };
964 }); 964 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698