| 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 * Creates a PreviewArea object. It represents the area where the preview | 9 * Creates a PreviewArea object. It represents the area where the preview |
| 10 * document is displayed. | 10 * document is displayed. |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 this.onPagePreviewReady_.bind(this)); | 355 this.onPagePreviewReady_.bind(this)); |
| 356 this.tracker.add( | 356 this.tracker.add( |
| 357 this.previewGenerator_, | 357 this.previewGenerator_, |
| 358 print_preview.PreviewGenerator.EventType.FAIL, | 358 print_preview.PreviewGenerator.EventType.FAIL, |
| 359 this.onPreviewGenerationFail_.bind(this)); | 359 this.onPreviewGenerationFail_.bind(this)); |
| 360 this.tracker.add( | 360 this.tracker.add( |
| 361 this.previewGenerator_, | 361 this.previewGenerator_, |
| 362 print_preview.PreviewGenerator.EventType.DOCUMENT_READY, | 362 print_preview.PreviewGenerator.EventType.DOCUMENT_READY, |
| 363 this.onDocumentReady_.bind(this)); | 363 this.onDocumentReady_.bind(this)); |
| 364 } else { | 364 } else { |
| 365 this.showCustomMessage(localStrings.getString('noPlugin')); | 365 this.showCustomMessage(loadTimeData.getString('noPlugin')); |
| 366 } | 366 } |
| 367 }, | 367 }, |
| 368 | 368 |
| 369 /** @override */ | 369 /** @override */ |
| 370 exitDocument: function() { | 370 exitDocument: function() { |
| 371 print_preview.Component.prototype.exitDocument.call(this); | 371 print_preview.Component.prototype.exitDocument.call(this); |
| 372 if (this.previewGenerator_) { | 372 if (this.previewGenerator_) { |
| 373 this.previewGenerator_.removeEventListeners(); | 373 this.previewGenerator_.removeEventListeners(); |
| 374 } | 374 } |
| 375 this.overlayEl_ = null; | 375 this.overlayEl_ = null; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 new print_preview.Size(viewportWidth, viewportHeight)); | 741 new print_preview.Size(viewportWidth, viewportHeight)); |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 }; | 744 }; |
| 745 | 745 |
| 746 // Export | 746 // Export |
| 747 return { | 747 return { |
| 748 PreviewArea: PreviewArea | 748 PreviewArea: PreviewArea |
| 749 }; | 749 }; |
| 750 }); | 750 }); |
| OLD | NEW |