| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 DestinationStore.EventType.CACHED_SELECTED_DESTINATION_INFO_READY); | 373 DestinationStore.EventType.CACHED_SELECTED_DESTINATION_INFO_READY); |
| 374 } else if (this.appState_.selectedDestinationOrigin == | 374 } else if (this.appState_.selectedDestinationOrigin == |
| 375 print_preview.Destination.Origin.EXTENSION) { | 375 print_preview.Destination.Origin.EXTENSION) { |
| 376 // TODO(tbarzic): Add support for requesting a single extension's | 376 // TODO(tbarzic): Add support for requesting a single extension's |
| 377 // printer list. | 377 // printer list. |
| 378 this.startLoadExtensionDestinations(); | 378 this.startLoadExtensionDestinations(); |
| 379 | 379 |
| 380 this.selectedDestination_ = | 380 this.selectedDestination_ = |
| 381 print_preview.ExtensionDestinationParser.parse({ | 381 print_preview.ExtensionDestinationParser.parse({ |
| 382 extensionId: this.appState_.selectedDestinationExtensionId, | 382 extensionId: this.appState_.selectedDestinationExtensionId, |
| 383 extensionName: this.appState_.selectedDestinationExtensionName, |
| 383 id: this.appState_.selectedDestinationId, | 384 id: this.appState_.selectedDestinationId, |
| 384 name: this.appState_.selectedDestinationName || '' | 385 name: this.appState_.selectedDestinationName || '' |
| 385 }); | 386 }); |
| 386 | 387 |
| 387 if (this.appState_.selectedDestinationCapabilities) { | 388 if (this.appState_.selectedDestinationCapabilities) { |
| 388 this.selectedDestination_.capabilities = | 389 this.selectedDestination_.capabilities = |
| 389 this.appState_.selectedDestinationCapabilities; | 390 this.appState_.selectedDestinationCapabilities; |
| 390 | 391 |
| 391 cr.dispatchSimpleEvent( | 392 cr.dispatchSimpleEvent( |
| 392 this, | 393 this, |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 return id == this.appState_.selectedDestinationId && | 1093 return id == this.appState_.selectedDestinationId && |
| 1093 origin == this.appState_.selectedDestinationOrigin; | 1094 origin == this.appState_.selectedDestinationOrigin; |
| 1094 } | 1095 } |
| 1095 }; | 1096 }; |
| 1096 | 1097 |
| 1097 // Export | 1098 // Export |
| 1098 return { | 1099 return { |
| 1099 DestinationStore: DestinationStore | 1100 DestinationStore: DestinationStore |
| 1100 }; | 1101 }; |
| 1101 }); | 1102 }); |
| OLD | NEW |