| 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.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * A data store that stores destinations and dispatches events when the data | 9 * A data store that stores destinations and dispatches events when the data |
| 10 * store changes. | 10 * store changes. |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 }, | 1593 }, |
| 1594 | 1594 |
| 1595 /** | 1595 /** |
| 1596 * Called when a request to get a local destination's print capabilities | 1596 * Called when a request to get a local destination's print capabilities |
| 1597 * fails. If the destination is the initial destination, auto-select another | 1597 * fails. If the destination is the initial destination, auto-select another |
| 1598 * destination instead. | 1598 * destination instead. |
| 1599 * @param {Event} event Contains the destination ID that failed. | 1599 * @param {Event} event Contains the destination ID that failed. |
| 1600 * @private | 1600 * @private |
| 1601 */ | 1601 */ |
| 1602 onGetCapabilitiesFail_: function(event) { | 1602 onGetCapabilitiesFail_: function(event) { |
| 1603 console.error('Failed to get print capabilities for printer ' + | 1603 console.warn('Failed to get print capabilities for printer ' + |
| 1604 event.destinationId); | 1604 event.destinationId); |
| 1605 if (this.autoSelectMatchingDestination_ && | 1605 if (this.autoSelectMatchingDestination_ && |
| 1606 this.autoSelectMatchingDestination_.matchIdAndOrigin( | 1606 this.autoSelectMatchingDestination_.matchIdAndOrigin( |
| 1607 event.destinationId, event.destinationOrigin)) { | 1607 event.destinationId, event.destinationOrigin)) { |
| 1608 this.selectDefaultDestination_(); | 1608 this.selectDefaultDestination_(); |
| 1609 } | 1609 } |
| 1610 }, | 1610 }, |
| 1611 | 1611 |
| 1612 /** | 1612 /** |
| 1613 * Called when the /search call completes, either successfully or not. | 1613 * Called when the /search call completes, either successfully or not. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 return this.getDestinationKey_( | 1774 return this.getDestinationKey_( |
| 1775 destination.origin, destination.id, destination.account); | 1775 destination.origin, destination.id, destination.account); |
| 1776 } | 1776 } |
| 1777 }; | 1777 }; |
| 1778 | 1778 |
| 1779 // Export | 1779 // Export |
| 1780 return { | 1780 return { |
| 1781 DestinationStore: DestinationStore | 1781 DestinationStore: DestinationStore |
| 1782 }; | 1782 }; |
| 1783 }); | 1783 }); |
| OLD | NEW |