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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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) { | |
|
dpapad
2011/10/31 15:53:12
Nit: No need for braces.
Albert Bodenhamer
2011/10/31 16:51:50
Done.
| |
| 276 sendPrintDocumentRequest(); | |
| 277 } | |
| 275 } else { | 278 } else { |
| 276 // This message will call back to 'updateWithPrinterCapabilities' | 279 // This message will call back to 'updateWithPrinterCapabilities' |
| 277 // function. | 280 // function. |
| 278 chrome.send('getPrinterCapabilities', [selectedValue]); | 281 chrome.send('getPrinterCapabilities', [selectedValue]); |
| 279 } | 282 } |
| 280 if (!skip_refresh) { | 283 if (!skip_refresh) { |
| 281 lastSelectedPrinterIndex = selectedIndex; | 284 lastSelectedPrinterIndex = selectedIndex; |
| 282 | 285 |
| 283 // Regenerate the preview data based on selected printer settings. | 286 // Regenerate the preview data based on selected printer settings. |
| 284 setDefaultValuesAndRegeneratePreview(true); | 287 setDefaultValuesAndRegeneratePreview(true); |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1093 <include src="copies_settings.js"/> | 1096 <include src="copies_settings.js"/> |
| 1094 <include src="header_footer_settings.js"/> | 1097 <include src="header_footer_settings.js"/> |
| 1095 <include src="layout_settings.js"/> | 1098 <include src="layout_settings.js"/> |
| 1096 <include src="color_settings.js"/> | 1099 <include src="color_settings.js"/> |
| 1097 <include src="margin_settings.js"/> | 1100 <include src="margin_settings.js"/> |
| 1098 <include src="margin_textbox.js"/> | 1101 <include src="margin_textbox.js"/> |
| 1099 <include src="margin_utils.js"/> | 1102 <include src="margin_utils.js"/> |
| 1100 <include src="margins_ui.js"/> | 1103 <include src="margins_ui.js"/> |
| 1101 <include src="margins_ui_pair.js"/> | 1104 <include src="margins_ui_pair.js"/> |
| 1102 <include src="preview_area.js"/> | 1105 <include src="preview_area.js"/> |
| OLD | NEW |