| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Print options section to control printer advanced options. | 9 * Print options section to control printer advanced options. |
| 10 * @param {!print_preview.DestinationStore} destinationStore Used to determine | 10 * @param {!print_preview.DestinationStore} destinationStore Used to determine |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 __proto__: print_preview.SettingsSection.prototype, | 34 __proto__: print_preview.SettingsSection.prototype, |
| 35 | 35 |
| 36 /** @override */ | 36 /** @override */ |
| 37 isAvailable: function() { | 37 isAvailable: function() { |
| 38 var destination = this.destinationStore_.selectedDestination; | 38 var destination = this.destinationStore_.selectedDestination; |
| 39 var vendorCapabilities = | 39 var vendorCapabilities = |
| 40 destination && | 40 destination && |
| 41 destination.capabilities && | 41 destination.capabilities && |
| 42 destination.capabilities.printer && | 42 destination.capabilities.printer && |
| 43 destination.capabilities.printer.vendor_capability; | 43 destination.capabilities.printer.vendor_capability; |
| 44 return false && !!vendorCapabilities; | 44 return !!vendorCapabilities; |
| 45 }, | 45 }, |
| 46 | 46 |
| 47 /** @override */ | 47 /** @override */ |
| 48 hasCollapsibleContent: function() { | 48 hasCollapsibleContent: function() { |
| 49 return this.isAvailable(); | 49 return this.isAvailable(); |
| 50 }, | 50 }, |
| 51 | 51 |
| 52 /** @param {boolean} Whether the component is enabled. */ | 52 /** @param {boolean} Whether the component is enabled. */ |
| 53 set isEnabled(isEnabled) { | 53 set isEnabled(isEnabled) { |
| 54 this.getButton_().disabled = !isEnabled; | 54 this.getButton_().disabled = !isEnabled; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 onDestinationChanged_: function() { | 89 onDestinationChanged_: function() { |
| 90 this.updateUiStateInternal(); | 90 this.updateUiStateInternal(); |
| 91 } | 91 } |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 // Export | 94 // Export |
| 95 return { | 95 return { |
| 96 AdvancedOptionsSettings: AdvancedOptionsSettings | 96 AdvancedOptionsSettings: AdvancedOptionsSettings |
| 97 }; | 97 }; |
| 98 }); | 98 }); |
| OLD | NEW |