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 * @typedef {Object|number|boolean|string} | 5 * @typedef {Object|number|boolean|string} |
6 */ | 6 */ |
7 print_preview.ValueType; | 7 print_preview.ValueType; |
8 | 8 |
9 cr.define('print_preview.ticket_items', function() { | 9 cr.define('print_preview.ticket_items', function() { |
10 'use strict'; | 10 'use strict'; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 return this.tracker_; | 183 return this.tracker_; |
184 }, | 184 }, |
185 | 185 |
186 /** | 186 /** |
187 * @return {print_preview.Destination} Selected destination from the | 187 * @return {print_preview.Destination} Selected destination from the |
188 * destination store, or {@code null} if no destination is selected. | 188 * destination store, or {@code null} if no destination is selected. |
189 * @protected | 189 * @protected |
190 */ | 190 */ |
191 getSelectedDestInternal: function() { | 191 getSelectedDestInternal: function() { |
192 return this.destinationStore_ ? | 192 return this.destinationStore_ ? |
193 this.destinationStore_.selectedDestination : null; | 193 this.destinationStore_.selectedDestination : |
| 194 null; |
194 }, | 195 }, |
195 | 196 |
196 /** | 197 /** |
197 * @return {print_preview.DocumentInfo} Document data model. | 198 * @return {print_preview.DocumentInfo} Document data model. |
198 * @protected | 199 * @protected |
199 */ | 200 */ |
200 getDocumentInfoInternal: function() { | 201 getDocumentInfoInternal: function() { |
201 return this.documentInfo_; | 202 return this.documentInfo_; |
202 }, | 203 }, |
203 | 204 |
(...skipping 16 matching lines...) Expand all Loading... |
220 }, | 221 }, |
221 | 222 |
222 /** | 223 /** |
223 * Adds event handlers for this class. | 224 * Adds event handlers for this class. |
224 * @private | 225 * @private |
225 */ | 226 */ |
226 addEventHandlers_: function() { | 227 addEventHandlers_: function() { |
227 if (this.destinationStore_) { | 228 if (this.destinationStore_) { |
228 this.tracker_.add( | 229 this.tracker_.add( |
229 this.destinationStore_, | 230 this.destinationStore_, |
230 print_preview.DestinationStore.EventType. | 231 print_preview.DestinationStore.EventType |
231 SELECTED_DESTINATION_CAPABILITIES_READY, | 232 .SELECTED_DESTINATION_CAPABILITIES_READY, |
232 this.dispatchChangeEventInternal.bind(this)); | 233 this.dispatchChangeEventInternal.bind(this)); |
233 } | 234 } |
234 if (this.documentInfo_) { | 235 if (this.documentInfo_) { |
235 this.tracker_.add( | 236 this.tracker_.add( |
236 this.documentInfo_, | 237 this.documentInfo_, print_preview.DocumentInfo.EventType.CHANGE, |
237 print_preview.DocumentInfo.EventType.CHANGE, | |
238 this.dispatchChangeEventInternal.bind(this)); | 238 this.dispatchChangeEventInternal.bind(this)); |
239 } | 239 } |
240 }, | 240 }, |
241 }; | 241 }; |
242 | 242 |
243 // Export | 243 // Export |
244 return { | 244 return {TicketItem: TicketItem}; |
245 TicketItem: TicketItem | |
246 }; | |
247 }); | 245 }); |
OLD | NEW |