Chromium Code Reviews| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 807 * Display an error message when print preview fails. | 807 * Display an error message when print preview fails. |
| 808 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). | 808 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). |
| 809 */ | 809 */ |
| 810 function printPreviewFailed() { | 810 function printPreviewFailed() { |
| 811 displayErrorMessageWithButton(localStrings.getString('previewFailed'), | 811 displayErrorMessageWithButton(localStrings.getString('previewFailed'), |
| 812 localStrings.getString('launchNativeDialog'), | 812 localStrings.getString('launchNativeDialog'), |
| 813 launchNativePrintDialog); | 813 launchNativePrintDialog); |
| 814 } | 814 } |
| 815 | 815 |
| 816 /** | 816 /** |
| 817 * Display an error message when encountered invalid printer settings. | |
| 818 * Called from PrintPreviewMessageHandler::OnInvalidDefaultPrinter(). | |
| 819 */ | |
| 820 function invalidPrinterSettings() { | |
|
kmadhusu
2011/08/30 02:11:27
Using "isTabHidden" variable, you can merge invali
arthurhsu
2011/08/30 20:43:03
Done.
| |
| 821 displayErrorMessage(localStrings.getString('invalidPrinterSettings')); | |
| 822 } | |
| 823 | |
| 824 function invalidPrinterSettingsAlert() { | |
|
kmadhusu
2011/08/30 02:11:27
This function is not required as per my previous c
arthurhsu
2011/08/30 20:43:03
Done.
| |
| 825 alert(localStrings.getString('invalidPrinterSettings')); | |
| 826 } | |
| 827 | |
| 828 /** | |
| 817 * Called when the PDF plugin loads its document. | 829 * Called when the PDF plugin loads its document. |
| 818 */ | 830 */ |
| 819 function onPDFLoad() { | 831 function onPDFLoad() { |
| 820 if (previewModifiable) { | 832 if (previewModifiable) { |
| 821 setPluginPreviewPageCount(); | 833 setPluginPreviewPageCount(); |
| 822 } | 834 } |
| 823 $('pdf-viewer').fitToHeight(); | 835 $('pdf-viewer').fitToHeight(); |
| 824 cr.dispatchSimpleEvent(document, 'PDFLoaded'); | 836 cr.dispatchSimpleEvent(document, 'PDFLoaded'); |
| 825 hideLoadingAnimation(); | 837 hideLoadingAnimation(); |
| 826 } | 838 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 <include src="print_preview_animations.js"/> | 998 <include src="print_preview_animations.js"/> |
| 987 <include src="print_preview_cloud.js"/> | 999 <include src="print_preview_cloud.js"/> |
| 988 <include src="print_preview_utils.js"/> | 1000 <include src="print_preview_utils.js"/> |
| 989 <include src="print_header.js"/> | 1001 <include src="print_header.js"/> |
| 990 <include src="page_settings.js"/> | 1002 <include src="page_settings.js"/> |
| 991 <include src="copies_settings.js"/> | 1003 <include src="copies_settings.js"/> |
| 992 <include src="header_footer_settings.js"/> | 1004 <include src="header_footer_settings.js"/> |
| 993 <include src="layout_settings.js"/> | 1005 <include src="layout_settings.js"/> |
| 994 <include src="color_settings.js"/> | 1006 <include src="color_settings.js"/> |
| 995 <include src="margin_settings.js"/> | 1007 <include src="margin_settings.js"/> |
| OLD | NEW |