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

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

Issue 8341126: Trigger print immediately on selecting GCP escape hatch on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 9 years, 1 month 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) 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 skip_refresh = true; 265 skip_refresh = true;
266 } else if (selectedValue == PRINT_TO_PDF || 266 } else if (selectedValue == PRINT_TO_PDF ||
267 selectedValue == PRINT_WITH_CLOUD_PRINT) { 267 selectedValue == PRINT_WITH_CLOUD_PRINT) {
268 updateWithPrinterCapabilities({ 268 updateWithPrinterCapabilities({
269 'disableColorOption': true, 269 'disableColorOption': true,
270 'setColorAsDefault': true, 270 'setColorAsDefault': true,
271 'setDuplexAsDefault': false, 271 'setDuplexAsDefault': false,
272 'printerColorModelForColor': print_preview.ColorSettings.COLOR, 272 'printerColorModelForColor': print_preview.ColorSettings.COLOR,
273 'printerDefaultDuplexValue': copiesSettings.UNKNOWN_DUPLEX_MODE, 273 'printerDefaultDuplexValue': copiesSettings.UNKNOWN_DUPLEX_MODE,
274 'disableCopiesOption': true}); 274 'disableCopiesOption': true});
275 if (cr.isChromeOS && selectedValue == PRINT_WITH_CLOUD_PRINT)
276 sendPrintDocumentRequest();
275 } else { 277 } else {
276 // This message will call back to 'updateWithPrinterCapabilities' 278 // This message will call back to 'updateWithPrinterCapabilities'
277 // function. 279 // function.
278 chrome.send('getPrinterCapabilities', [selectedValue]); 280 chrome.send('getPrinterCapabilities', [selectedValue]);
279 } 281 }
280 if (!skip_refresh) { 282 if (!skip_refresh) {
281 lastSelectedPrinterIndex = selectedIndex; 283 lastSelectedPrinterIndex = selectedIndex;
282 284
283 // Regenerate the preview data based on selected printer settings. 285 // Regenerate the preview data based on selected printer settings.
284 setDefaultValuesAndRegeneratePreview(true); 286 setDefaultValuesAndRegeneratePreview(true);
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 <include src="copies_settings.js"/> 1095 <include src="copies_settings.js"/>
1094 <include src="header_footer_settings.js"/> 1096 <include src="header_footer_settings.js"/>
1095 <include src="layout_settings.js"/> 1097 <include src="layout_settings.js"/>
1096 <include src="color_settings.js"/> 1098 <include src="color_settings.js"/>
1097 <include src="margin_settings.js"/> 1099 <include src="margin_settings.js"/>
1098 <include src="margin_textbox.js"/> 1100 <include src="margin_textbox.js"/>
1099 <include src="margin_utils.js"/> 1101 <include src="margin_utils.js"/>
1100 <include src="margins_ui.js"/> 1102 <include src="margins_ui.js"/>
1101 <include src="margins_ui_pair.js"/> 1103 <include src="margins_ui_pair.js"/>
1102 <include src="preview_area.js"/> 1104 <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