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 * CSS classes used by the component. | 8 * CSS classes used by the component. |
9 * @enum {string} | 9 * @enum {string} |
10 * @private | 10 * @private |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 var changeButton = this.getElement().getElementsByClassName( | 91 var changeButton = this.getElement().getElementsByClassName( |
92 print_preview.DestinationSettingsClasses_.CHANGE_BUTTON)[0]; | 92 print_preview.DestinationSettingsClasses_.CHANGE_BUTTON)[0]; |
93 this.tracker.add( | 93 this.tracker.add( |
94 changeButton, 'click', this.onChangeButtonClick_.bind(this)); | 94 changeButton, 'click', this.onChangeButtonClick_.bind(this)); |
95 this.tracker.add( | 95 this.tracker.add( |
96 this.destinationStore_, | 96 this.destinationStore_, |
97 print_preview.DestinationStore.EventType.DESTINATION_SELECT, | 97 print_preview.DestinationStore.EventType.DESTINATION_SELECT, |
98 this.onDestinationSelect_.bind(this)); | 98 this.onDestinationSelect_.bind(this)); |
99 this.tracker_.add( | 99 this.tracker_.add( |
100 this.destinationStore_, | 100 this.destinationStore_, |
101 print_preview.DestinationStore.EventType. | 101 print_preview.DestinationStore.EventType |
102 CACHED_SELECTED_DESTINATION_INFO_READY, | 102 .CACHED_SELECTED_DESTINATION_INFO_READY, |
103 this.onSelectedDestinationNameSet_.bind(this)); | 103 this.onSelectedDestinationNameSet_.bind(this)); |
104 }, | 104 }, |
105 | 105 |
106 /** | 106 /** |
107 * Called when the "Change" button is clicked. Dispatches the | 107 * Called when the "Change" button is clicked. Dispatches the |
108 * CHANGE_BUTTON_ACTIVATE event. | 108 * CHANGE_BUTTON_ACTIVATE event. |
109 * @private | 109 * @private |
110 */ | 110 */ |
111 onChangeButtonClick_: function() { | 111 onChangeButtonClick_: function() { |
112 cr.dispatchSimpleEvent( | 112 cr.dispatchSimpleEvent( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 var destinationName = | 161 var destinationName = |
162 this.destinationStore_.selectedDestination.displayName; | 162 this.destinationStore_.selectedDestination.displayName; |
163 var nameEl = this.getElement().getElementsByClassName( | 163 var nameEl = this.getElement().getElementsByClassName( |
164 print_preview.DestinationSettingsClasses_.THOBBER_NAME)[0]; | 164 print_preview.DestinationSettingsClasses_.THOBBER_NAME)[0]; |
165 nameEl.textContent = destinationName; | 165 nameEl.textContent = destinationName; |
166 nameEl.title = destinationName; | 166 nameEl.title = destinationName; |
167 } | 167 } |
168 }; | 168 }; |
169 | 169 |
170 // Export | 170 // Export |
171 return { | 171 return {DestinationSettings: DestinationSettings}; |
172 DestinationSettings: DestinationSettings | |
173 }; | |
174 }); | 172 }); |
OLD | NEW |