| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 printerList.selectedIndex = lastSelectedPrinterIndex; | 229 printerList.selectedIndex = lastSelectedPrinterIndex; |
| 230 chrome.send(selectedValue); | 230 chrome.send(selectedValue); |
| 231 skip_refresh = true; | 231 skip_refresh = true; |
| 232 } else if (selectedValue == MORE_PRINTERS) { | 232 } else if (selectedValue == MORE_PRINTERS) { |
| 233 onSystemDialogLinkClicked(); | 233 onSystemDialogLinkClicked(); |
| 234 skip_refresh = true; | 234 skip_refresh = true; |
| 235 } else if (selectedValue == PRINT_TO_PDF) { | 235 } else if (selectedValue == PRINT_TO_PDF) { |
| 236 updateWithPrinterCapabilities({ | 236 updateWithPrinterCapabilities({ |
| 237 'disableColorOption': true, | 237 'disableColorOption': true, |
| 238 'setColorAsDefault': true, | 238 'setColorAsDefault': true, |
| 239 'setDuplexAsDefault': false, | 239 'printerDefaultDuplexValue': copiesSettings.SIMPLEX, |
| 240 'disableCopiesOption': true}); | 240 'disableCopiesOption': true}); |
| 241 } else { | 241 } else { |
| 242 // This message will call back to 'updateWithPrinterCapabilities' | 242 // This message will call back to 'updateWithPrinterCapabilities' |
| 243 // function. | 243 // function. |
| 244 chrome.send('getPrinterCapabilities', [selectedValue]); | 244 chrome.send('getPrinterCapabilities', [selectedValue]); |
| 245 } | 245 } |
| 246 if (!skip_refresh) { | 246 if (!skip_refresh) { |
| 247 lastSelectedPrinterIndex = selectedIndex; | 247 lastSelectedPrinterIndex = selectedIndex; |
| 248 | 248 |
| 249 // Regenerate the preview data based on selected printer settings. | 249 // Regenerate the preview data based on selected printer settings. |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 <include src="print_preview_animations.js"/> | 1088 <include src="print_preview_animations.js"/> |
| 1089 <include src="print_preview_cloud.js"/> | 1089 <include src="print_preview_cloud.js"/> |
| 1090 <include src="print_preview_utils.js"/> | 1090 <include src="print_preview_utils.js"/> |
| 1091 <include src="print_header.js"/> | 1091 <include src="print_header.js"/> |
| 1092 <include src="page_settings.js"/> | 1092 <include src="page_settings.js"/> |
| 1093 <include src="copies_settings.js"/> | 1093 <include src="copies_settings.js"/> |
| 1094 <include src="header_footer_settings.js"/> | 1094 <include src="header_footer_settings.js"/> |
| 1095 <include src="layout_settings.js"/> | 1095 <include src="layout_settings.js"/> |
| 1096 <include src="color_settings.js"/> | 1096 <include src="color_settings.js"/> |
| 1097 <include src="margin_settings.js"/> | 1097 <include src="margin_settings.js"/> |
| OLD | NEW |