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

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

Issue 325313003: Add vendor id and custom display name to media selection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address cl comments. Created 6 years, 6 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 | Annotate | Revision Log
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.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * An interface to the native Chromium printing system layer. 9 * An interface to the native Chromium printing system layer.
10 * @constructor 10 * @constructor
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 * @param {boolean=} opt_isOpenPdfInPreview Whether to open the PDF in the 270 * @param {boolean=} opt_isOpenPdfInPreview Whether to open the PDF in the
271 * system's preview application. 271 * system's preview application.
272 */ 272 */
273 startPrint: function(destination, printTicketStore, cloudPrintInterface, 273 startPrint: function(destination, printTicketStore, cloudPrintInterface,
274 documentInfo, opt_isOpenPdfInPreview) { 274 documentInfo, opt_isOpenPdfInPreview) {
275 assert(printTicketStore.isTicketValid(), 275 assert(printTicketStore.isTicketValid(),
276 'Trying to print when ticket is not valid'); 276 'Trying to print when ticket is not valid');
277 277
278 var ticket = { 278 var ticket = {
279 'pageRange': printTicketStore.pageRange.getDocumentPageRanges(), 279 'pageRange': printTicketStore.pageRange.getDocumentPageRanges(),
280 'mediaSize': printTicketStore.mediaSize.getValue(),
280 'pageCount': printTicketStore.pageRange.getPageNumberSet().size, 281 'pageCount': printTicketStore.pageRange.getPageNumberSet().size,
281 'landscape': printTicketStore.landscape.getValue(), 282 'landscape': printTicketStore.landscape.getValue(),
282 'color': this.getNativeColorModel_(destination, printTicketStore.color), 283 'color': this.getNativeColorModel_(destination, printTicketStore.color),
283 'headerFooterEnabled': printTicketStore.headerFooter.getValue(), 284 'headerFooterEnabled': printTicketStore.headerFooter.getValue(),
284 'marginsType': printTicketStore.marginsType.getValue(), 285 'marginsType': printTicketStore.marginsType.getValue(),
285 'generateDraftData': true, // TODO(rltoscano): What should this be? 286 'generateDraftData': true, // TODO(rltoscano): What should this be?
286 'duplex': printTicketStore.duplex.getValue() ? 287 'duplex': printTicketStore.duplex.getValue() ?
287 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX, 288 NativeLayer.DuplexMode.LONG_EDGE : NativeLayer.DuplexMode.SIMPLEX,
288 'copies': printTicketStore.copies.getValueAsNumber(), 289 'copies': printTicketStore.copies.getValueAsNumber(),
289 'collate': printTicketStore.collate.getValue(), 290 'collate': printTicketStore.collate.getValue(),
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 return this.serializedAppStateStr_; 866 return this.serializedAppStateStr_;
866 } 867 }
867 }; 868 };
868 869
869 // Export 870 // Export
870 return { 871 return {
871 NativeInitialSettings: NativeInitialSettings, 872 NativeInitialSettings: NativeInitialSettings,
872 NativeLayer: NativeLayer 873 NativeLayer: NativeLayer
873 }; 874 };
874 }); 875 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698