| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // require: cr/ui/print_preview_cloud.js | 5 // require: cr/ui/print_preview_cloud.js |
| 6 | 6 |
| 7 var localStrings = new LocalStrings(); | 7 var localStrings = new LocalStrings(); |
| 8 | 8 |
| 9 // If useCloudPrint is true we attempt to connect to cloud print | 9 // If useCloudPrint is true we attempt to connect to cloud print |
| 10 // and populate the list of printers with cloud print printers. | 10 // and populate the list of printers with cloud print printers. |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 | 801 |
| 802 /** | 802 /** |
| 803 * Display an error message when print preview fails. | 803 * Display an error message when print preview fails. |
| 804 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). | 804 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). |
| 805 */ | 805 */ |
| 806 function printPreviewFailed() { | 806 function printPreviewFailed() { |
| 807 displayErrorMessage(localStrings.getString('previewFailed')); | 807 displayErrorMessage(localStrings.getString('previewFailed')); |
| 808 } | 808 } |
| 809 | 809 |
| 810 /** | 810 /** |
| 811 * Display an error message when encountered invalid default printer. |
| 812 * Called from PrintPreviewMessageHandler::OnInvalidDefaultPrinter(). |
| 813 */ |
| 814 function invalidDefaultPrinter() { |
| 815 displayErrorMessage(localStrings.getString('invalidDefaultPrinter')); |
| 816 } |
| 817 |
| 818 /** |
| 811 * Called when the PDF plugin loads its document. | 819 * Called when the PDF plugin loads its document. |
| 812 */ | 820 */ |
| 813 function onPDFLoad() { | 821 function onPDFLoad() { |
| 814 if (previewModifiable) { | 822 if (previewModifiable) { |
| 815 setPluginPreviewPageCount(); | 823 setPluginPreviewPageCount(); |
| 816 } | 824 } |
| 817 $('pdf-viewer').fitToHeight(); | 825 $('pdf-viewer').fitToHeight(); |
| 818 cr.dispatchSimpleEvent(document, 'PDFLoaded'); | 826 cr.dispatchSimpleEvent(document, 'PDFLoaded'); |
| 819 hideLoadingAnimation(); | 827 hideLoadingAnimation(); |
| 820 } | 828 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 <include src="print_preview_animations.js"/> | 988 <include src="print_preview_animations.js"/> |
| 981 <include src="print_preview_cloud.js"/> | 989 <include src="print_preview_cloud.js"/> |
| 982 <include src="print_preview_utils.js"/> | 990 <include src="print_preview_utils.js"/> |
| 983 <include src="print_header.js"/> | 991 <include src="print_header.js"/> |
| 984 <include src="page_settings.js"/> | 992 <include src="page_settings.js"/> |
| 985 <include src="copies_settings.js"/> | 993 <include src="copies_settings.js"/> |
| 986 <include src="header_footer_settings.js"/> | 994 <include src="header_footer_settings.js"/> |
| 987 <include src="layout_settings.js"/> | 995 <include src="layout_settings.js"/> |
| 988 <include src="color_settings.js"/> | 996 <include src="color_settings.js"/> |
| 989 <include src="margin_settings.js"/> | 997 <include src="margin_settings.js"/> |
| OLD | NEW |