Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 7740005: Print preview not showing if default print is invalid. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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.
kmadhusu 2011/08/26 18:50:40 nit: Update the comment.
arthurhsu 2011/08/29 22:53:16 Done.
812 * Called from PrintPreviewMessageHandler::OnInvalidDefaultPrinter().
813 */
814 function invalidPrinterSettings() {
815 displayErrorMessage(localStrings.getString('invalidPrinterSettings'));
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
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"/>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698