| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 * @private | 673 * @private |
| 674 */ | 674 */ |
| 675 createLocalPdfPrintDestination_: function() { | 675 createLocalPdfPrintDestination_: function() { |
| 676 // TODO(alekseys): Create PDF printer in the native code and send its | 676 // TODO(alekseys): Create PDF printer in the native code and send its |
| 677 // capabilities back with other local printers. | 677 // capabilities back with other local printers. |
| 678 if (this.pdfPrinterEnabled_) { | 678 if (this.pdfPrinterEnabled_) { |
| 679 this.insertDestination_(new print_preview.Destination( | 679 this.insertDestination_(new print_preview.Destination( |
| 680 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, | 680 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF, |
| 681 print_preview.Destination.Type.LOCAL, | 681 print_preview.Destination.Type.LOCAL, |
| 682 print_preview.Destination.Origin.LOCAL, | 682 print_preview.Destination.Origin.LOCAL, |
| 683 localStrings.getString('printToPDF'), | 683 loadTimeData.getString('printToPDF'), |
| 684 false /*isRecent*/, | 684 false /*isRecent*/, |
| 685 print_preview.Destination.ConnectionStatus.ONLINE)); | 685 print_preview.Destination.ConnectionStatus.ONLINE)); |
| 686 } | 686 } |
| 687 }, | 687 }, |
| 688 | 688 |
| 689 /** | 689 /** |
| 690 * Resets the state of the destination store to its initial state. | 690 * Resets the state of the destination store to its initial state. |
| 691 * @private | 691 * @private |
| 692 */ | 692 */ |
| 693 reset_: function() { | 693 reset_: function() { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 return id == this.appState_.selectedDestinationId && | 926 return id == this.appState_.selectedDestinationId && |
| 927 origin == this.appState_.selectedDestinationOrigin; | 927 origin == this.appState_.selectedDestinationOrigin; |
| 928 } | 928 } |
| 929 }; | 929 }; |
| 930 | 930 |
| 931 // Export | 931 // Export |
| 932 return { | 932 return { |
| 933 DestinationStore: DestinationStore | 933 DestinationStore: DestinationStore |
| 934 }; | 934 }; |
| 935 }); | 935 }); |
| OLD | NEW |