| 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 * @private | 686 * @private |
| 687 */ | 687 */ |
| 688 createLocalPdfPrintDestination_: function() { | 688 createLocalPdfPrintDestination_: function() { |
| 689 // TODO(alekseys): Create PDF printer in the native code and send its | 689 // TODO(alekseys): Create PDF printer in the native code and send its |
| 690 // capabilities back with other local printers. | 690 // capabilities back with other local printers. |
| 691 if (this.pdfPrinterEnabled_) { | 691 if (this.pdfPrinterEnabled_) { |
| 692 this.insertDestination_(new print_preview.Destination( | 692 this.insertDestination_(new print_preview.Destination( |
| 693 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, | 693 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, |
| 694 print_preview.Destination.Type.LOCAL, | 694 print_preview.Destination.Type.LOCAL, |
| 695 print_preview.Destination.Origin.LOCAL, | 695 print_preview.Destination.Origin.LOCAL, |
| 696 localStrings.getString('printToPDF'), | 696 loadTimeData.getString('printToPDF'), |
| 697 false /*isRecent*/, | 697 false /*isRecent*/, |
| 698 print_preview.Destination.ConnectionStatus.ONLINE)); | 698 print_preview.Destination.ConnectionStatus.ONLINE)); |
| 699 } | 699 } |
| 700 }, | 700 }, |
| 701 | 701 |
| 702 /** | 702 /** |
| 703 * Resets the state of the destination store to its initial state. | 703 * Resets the state of the destination store to its initial state. |
| 704 * @private | 704 * @private |
| 705 */ | 705 */ |
| 706 reset_: function() { | 706 reset_: function() { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 return id == this.appState_.selectedDestinationId && | 951 return id == this.appState_.selectedDestinationId && |
| 952 origin == this.appState_.selectedDestinationOrigin; | 952 origin == this.appState_.selectedDestinationOrigin; |
| 953 } | 953 } |
| 954 }; | 954 }; |
| 955 | 955 |
| 956 // Export | 956 // Export |
| 957 return { | 957 return { |
| 958 DestinationStore: DestinationStore | 958 DestinationStore: DestinationStore |
| 959 }; | 959 }; |
| 960 }); | 960 }); |
| OLD | NEW |