| 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 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 this.dispatchEvent(localDestsSetEvent); | 543 this.dispatchEvent(localDestsSetEvent); |
| 544 }, | 544 }, |
| 545 | 545 |
| 546 /** | 546 /** |
| 547 * Called when native layer gets settings information for a requested local | 547 * Called when native layer gets settings information for a requested local |
| 548 * destination. | 548 * destination. |
| 549 * @param {Object} settingsInfo printer setting information. | 549 * @param {Object} settingsInfo printer setting information. |
| 550 * @private | 550 * @private |
| 551 */ | 551 */ |
| 552 onUpdateWithPrinterCapabilities_: function(settingsInfo) { | 552 onUpdateWithPrinterCapabilities_: function(settingsInfo) { |
| 553 assert(settingsInfo.capabilities, |
| 554 'Capabilities update without capabilites'); |
| 553 var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET); | 555 var capsSetEvent = new Event(NativeLayer.EventType.CAPABILITIES_SET); |
| 554 capsSetEvent.settingsInfo = settingsInfo; | 556 capsSetEvent.settingsInfo = settingsInfo; |
| 555 this.dispatchEvent(capsSetEvent); | 557 this.dispatchEvent(capsSetEvent); |
| 556 }, | 558 }, |
| 557 | 559 |
| 558 /** | 560 /** |
| 559 * Called when native layer gets settings information for a requested local | 561 * Called when native layer gets settings information for a requested local |
| 560 * destination. | 562 * destination. |
| 561 * @param {string} destinationId Printer affected by error. | 563 * @param {string} destinationId Printer affected by error. |
| 562 * @private | 564 * @private |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 return this.serializedDefaultDestinationSelectionRulesStr_; | 1106 return this.serializedDefaultDestinationSelectionRulesStr_; |
| 1105 } | 1107 } |
| 1106 }; | 1108 }; |
| 1107 | 1109 |
| 1108 // Export | 1110 // Export |
| 1109 return { | 1111 return { |
| 1110 NativeInitialSettings: NativeInitialSettings, | 1112 NativeInitialSettings: NativeInitialSettings, |
| 1111 NativeLayer: NativeLayer | 1113 NativeLayer: NativeLayer |
| 1112 }; | 1114 }; |
| 1113 }); | 1115 }); |
| OLD | NEW |