OLD | NEW |
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 // TODO(rltoscano): Move data/* into print_preview.data namespace | 5 // TODO(rltoscano): Move data/* into print_preview.data namespace |
6 | 6 |
7 <include src="component.js"> | 7 <include src="component.js"> |
8 <include src="print_preview_focus_manager.js"> | 8 <include src="print_preview_focus_manager.js"> |
9 | 9 |
10 cr.define('print_preview', function() { | 10 cr.define('print_preview', function() { |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 if (event.optionsFromDocument.disableScaling) { | 989 if (event.optionsFromDocument.disableScaling) { |
990 this.printTicketStore_.fitToPage.updateValue(null); | 990 this.printTicketStore_.fitToPage.updateValue(null); |
991 this.documentInfo_.updateIsScalingDisabled(true); | 991 this.documentInfo_.updateIsScalingDisabled(true); |
992 } | 992 } |
993 | 993 |
994 if (event.optionsFromDocument.copies > 0 && | 994 if (event.optionsFromDocument.copies > 0 && |
995 this.printTicketStore_.copies.isCapabilityAvailable()) { | 995 this.printTicketStore_.copies.isCapabilityAvailable()) { |
996 this.printTicketStore_.copies.updateValue( | 996 this.printTicketStore_.copies.updateValue( |
997 event.optionsFromDocument.copies); | 997 event.optionsFromDocument.copies); |
998 } | 998 } |
| 999 |
| 1000 if (event.optionsFromDocument.duplex >= 0 && |
| 1001 this.printTicketStore_.duplex.isCapabilityAvailable()) { |
| 1002 this.printTicketStore_.duplex.updateValue( |
| 1003 event.optionsFromDocument.duplex); |
| 1004 } |
999 }, | 1005 }, |
1000 | 1006 |
1001 /** | 1007 /** |
1002 * Called when privet printing fails. | 1008 * Called when privet printing fails. |
1003 * @param {Event} event Event object representing the failure. | 1009 * @param {Event} event Event object representing the failure. |
1004 * @private | 1010 * @private |
1005 */ | 1011 */ |
1006 onPrivetPrintFailed_: function(event) { | 1012 onPrivetPrintFailed_: function(event) { |
1007 console.error('Privet printing failed with error code ' + | 1013 console.error('Privet printing failed with error code ' + |
1008 event.httpError); | 1014 event.httpError); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 <include src="search/cloud_destination_list.js"> | 1315 <include src="search/cloud_destination_list.js"> |
1310 <include src="search/recent_destination_list.js"> | 1316 <include src="search/recent_destination_list.js"> |
1311 <include src="search/destination_list_item.js"> | 1317 <include src="search/destination_list_item.js"> |
1312 <include src="search/destination_search.js"> | 1318 <include src="search/destination_search.js"> |
1313 <include src="search/fedex_tos.js"> | 1319 <include src="search/fedex_tos.js"> |
1314 | 1320 |
1315 window.addEventListener('DOMContentLoaded', function() { | 1321 window.addEventListener('DOMContentLoaded', function() { |
1316 printPreview = new print_preview.PrintPreview(); | 1322 printPreview = new print_preview.PrintPreview(); |
1317 printPreview.initialize(); | 1323 printPreview.initialize(); |
1318 }); | 1324 }); |
OLD | NEW |