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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 destination.capabilities.printer && | 42 destination.capabilities.printer && |
43 destination.capabilities.printer.vendor_capability; | 43 destination.capabilities.printer.vendor_capability; |
44 return !!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} isEnabled Whether the component is enabled. */ |
53 set isEnabled(isEnabled) { | 53 set isEnabled(isEnabled) { |
54 this.getButton_().disabled = !isEnabled; | 54 this.getButton_().disabled = !isEnabled; |
55 }, | 55 }, |
56 | 56 |
57 /** @override */ | 57 /** @override */ |
58 enterDocument: function() { | 58 enterDocument: function() { |
59 print_preview.SettingsSection.prototype.enterDocument.call(this); | 59 print_preview.SettingsSection.prototype.enterDocument.call(this); |
60 | 60 |
61 this.tracker.add( | 61 this.tracker.add( |
62 this.getButton_(), 'click', function() { | 62 this.getButton_(), 'click', function() { |
(...skipping 26 matching lines...) Expand all 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 |