| 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 * Display an error message when print preview fails. | 856 * Display an error message when print preview fails. |
| 857 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). | 857 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). |
| 858 */ | 858 */ |
| 859 function printPreviewFailed() { | 859 function printPreviewFailed() { |
| 860 displayErrorMessageWithButton(localStrings.getString('previewFailed'), | 860 displayErrorMessageWithButton(localStrings.getString('previewFailed'), |
| 861 localStrings.getString('launchNativeDialog'), | 861 localStrings.getString('launchNativeDialog'), |
| 862 launchNativePrintDialog); | 862 launchNativePrintDialog); |
| 863 } | 863 } |
| 864 | 864 |
| 865 /** | 865 /** |
| 866 * Display an error message when encountered invalid printer settings. |
| 867 * Called from PrintPreviewMessageHandler::OnInvalidDefaultPrinter(). |
| 868 */ |
| 869 function invalidPrinterSettings() { |
| 870 displayErrorMessage(localStrings.getString('invalidPrinterSettings')); |
| 871 } |
| 872 |
| 873 /** |
| 866 * Called when the PDF plugin loads its document. | 874 * Called when the PDF plugin loads its document. |
| 867 */ | 875 */ |
| 868 function onPDFLoad() { | 876 function onPDFLoad() { |
| 869 if (previewModifiable) { | 877 if (previewModifiable) { |
| 870 setPluginPreviewPageCount(); | 878 setPluginPreviewPageCount(); |
| 871 } | 879 } |
| 872 $('pdf-viewer').fitToHeight(); | 880 $('pdf-viewer').fitToHeight(); |
| 873 cr.dispatchSimpleEvent(document, 'PDFLoaded'); | 881 cr.dispatchSimpleEvent(document, 'PDFLoaded'); |
| 874 hideLoadingAnimation(); | 882 hideLoadingAnimation(); |
| 875 } | 883 } |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 <include src="print_preview_animations.js"/> | 1085 <include src="print_preview_animations.js"/> |
| 1078 <include src="print_preview_cloud.js"/> | 1086 <include src="print_preview_cloud.js"/> |
| 1079 <include src="print_preview_utils.js"/> | 1087 <include src="print_preview_utils.js"/> |
| 1080 <include src="print_header.js"/> | 1088 <include src="print_header.js"/> |
| 1081 <include src="page_settings.js"/> | 1089 <include src="page_settings.js"/> |
| 1082 <include src="copies_settings.js"/> | 1090 <include src="copies_settings.js"/> |
| 1083 <include src="header_footer_settings.js"/> | 1091 <include src="header_footer_settings.js"/> |
| 1084 <include src="layout_settings.js"/> | 1092 <include src="layout_settings.js"/> |
| 1085 <include src="color_settings.js"/> | 1093 <include src="color_settings.js"/> |
| 1086 <include src="margin_settings.js"/> | 1094 <include src="margin_settings.js"/> |
| OLD | NEW |