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

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

Issue 7715022: Print Preview: Provide a link to try printing with the system dialog when print preview fails. Al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 $('system-dialog-throbber').classList.add('hidden'); 797 $('system-dialog-throbber').classList.add('hidden');
798 $('native-print-dialog-throbber').classList.add('hidden'); 798 $('native-print-dialog-throbber').classList.add('hidden');
799 displayErrorMessage(errorMessage); 799 displayErrorMessage(errorMessage);
800 } 800 }
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 displayErrorMessageWithButton(localStrings.getString('previewFailed'),
808 localStrings.getString('launchNativeDialog'),
809 launchNativePrintDialog);
kmadhusu 2011/08/24 23:30:43 I thought launchNativePrintDialog is for cloud pri
Lei Zhang 2011/08/24 23:46:25 launchNativePrintDialog is for chromium, not cloud
808 } 810 }
809 811
810 /** 812 /**
811 * Called when the PDF plugin loads its document. 813 * Called when the PDF plugin loads its document.
812 */ 814 */
813 function onPDFLoad() { 815 function onPDFLoad() {
814 if (previewModifiable) { 816 if (previewModifiable) {
815 setPluginPreviewPageCount(); 817 setPluginPreviewPageCount();
816 } 818 }
817 $('pdf-viewer').fitToHeight(); 819 $('pdf-viewer').fitToHeight();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 <include src="print_preview_animations.js"/> 982 <include src="print_preview_animations.js"/>
981 <include src="print_preview_cloud.js"/> 983 <include src="print_preview_cloud.js"/>
982 <include src="print_preview_utils.js"/> 984 <include src="print_preview_utils.js"/>
983 <include src="print_header.js"/> 985 <include src="print_header.js"/>
984 <include src="page_settings.js"/> 986 <include src="page_settings.js"/>
985 <include src="copies_settings.js"/> 987 <include src="copies_settings.js"/>
986 <include src="header_footer_settings.js"/> 988 <include src="header_footer_settings.js"/>
987 <include src="layout_settings.js"/> 989 <include src="layout_settings.js"/>
988 <include src="color_settings.js"/> 990 <include src="color_settings.js"/>
989 <include src="margin_settings.js"/> 991 <include src="margin_settings.js"/>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698