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

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

Issue 10048009: Stop displaying button to launch system print dialog when preview fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 previewArea.pdfPlugin.grayscale(!color); 792 previewArea.pdfPlugin.grayscale(!color);
793 var printerList = $('printer-list'); 793 var printerList = $('printer-list');
794 cloudprint.setColor(printerList[printerList.selectedIndex], color); 794 cloudprint.setColor(printerList[printerList.selectedIndex], color);
795 } 795 }
796 796
797 /** 797 /**
798 * Display an error message when print preview fails. 798 * Display an error message when print preview fails.
799 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed(). 799 * Called from PrintPreviewMessageHandler::OnPrintPreviewFailed().
800 */ 800 */
801 function printPreviewFailed() { 801 function printPreviewFailed() {
802 previewArea.displayErrorMessageWithButtonAndNotify( 802 previewArea.displayErrorMessageAndNotify(
803 localStrings.getString('previewFailed'), 803 localStrings.getString('previewFailed'));
804 localStrings.getString('launchNativeDialog'),
805 launchNativePrintDialog);
806 } 804 }
807 805
808 /** 806 /**
809 * Display an error message when encountered invalid printer settings. 807 * Display an error message when encountered invalid printer settings.
810 * Called from PrintPreviewMessageHandler::OnInvalidPrinterSettings(). 808 * Called from PrintPreviewMessageHandler::OnInvalidPrinterSettings().
811 */ 809 */
812 function invalidPrinterSettings() { 810 function invalidPrinterSettings() {
813 if (cr.isMac) { 811 if (cr.isMac) {
814 if (previewAppRequested) { 812 if (previewAppRequested) {
815 $('open-preview-app-throbber').hidden = true; 813 $('open-preview-app-throbber').hidden = true;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 <include src="copies_settings.js"/> 1204 <include src="copies_settings.js"/>
1207 <include src="header_footer_settings.js"/> 1205 <include src="header_footer_settings.js"/>
1208 <include src="layout_settings.js"/> 1206 <include src="layout_settings.js"/>
1209 <include src="color_settings.js"/> 1207 <include src="color_settings.js"/>
1210 <include src="margin_settings.js"/> 1208 <include src="margin_settings.js"/>
1211 <include src="margin_textbox.js"/> 1209 <include src="margin_textbox.js"/>
1212 <include src="margin_utils.js"/> 1210 <include src="margin_utils.js"/>
1213 <include src="margins_ui.js"/> 1211 <include src="margins_ui.js"/>
1214 <include src="margins_ui_pair.js"/> 1212 <include src="margins_ui_pair.js"/>
1215 <include src="preview_area.js"/> 1213 <include src="preview_area.js"/>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698