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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 skip_refresh = true; | 232 skip_refresh = true; |
233 } else if (selectedValue == MORE_PRINTERS) { | 233 } else if (selectedValue == MORE_PRINTERS) { |
234 onSystemDialogLinkClicked(); | 234 onSystemDialogLinkClicked(); |
235 skip_refresh = true; | 235 skip_refresh = true; |
236 } else if (selectedValue == PRINT_TO_PDF) { | 236 } else if (selectedValue == PRINT_TO_PDF) { |
237 updateWithPrinterCapabilities({ | 237 updateWithPrinterCapabilities({ |
238 'disableColorOption': true, | 238 'disableColorOption': true, |
239 'setColorAsDefault': true, | 239 'setColorAsDefault': true, |
240 'setDuplexAsDefault': false, | 240 'setDuplexAsDefault': false, |
241 'printerColorModelForColor': colorSettings.COLOR, | 241 'printerColorModelForColor': colorSettings.COLOR, |
| 242 'printerDefaultDuplexValue': copiesSettings.UNKNOWN_DUPLEX_MODE, |
242 'disableCopiesOption': true}); | 243 'disableCopiesOption': true}); |
243 } else { | 244 } else { |
244 // This message will call back to 'updateWithPrinterCapabilities' | 245 // This message will call back to 'updateWithPrinterCapabilities' |
245 // function. | 246 // function. |
246 chrome.send('getPrinterCapabilities', [selectedValue]); | 247 chrome.send('getPrinterCapabilities', [selectedValue]); |
247 } | 248 } |
248 if (!skip_refresh) { | 249 if (!skip_refresh) { |
249 lastSelectedPrinterIndex = selectedIndex; | 250 lastSelectedPrinterIndex = selectedIndex; |
250 | 251 |
251 // Regenerate the preview data based on selected printer settings. | 252 // Regenerate the preview data based on selected printer settings. |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 <include src="print_preview_animations.js"/> | 1102 <include src="print_preview_animations.js"/> |
1102 <include src="print_preview_cloud.js"/> | 1103 <include src="print_preview_cloud.js"/> |
1103 <include src="print_preview_utils.js"/> | 1104 <include src="print_preview_utils.js"/> |
1104 <include src="print_header.js"/> | 1105 <include src="print_header.js"/> |
1105 <include src="page_settings.js"/> | 1106 <include src="page_settings.js"/> |
1106 <include src="copies_settings.js"/> | 1107 <include src="copies_settings.js"/> |
1107 <include src="header_footer_settings.js"/> | 1108 <include src="header_footer_settings.js"/> |
1108 <include src="layout_settings.js"/> | 1109 <include src="layout_settings.js"/> |
1109 <include src="color_settings.js"/> | 1110 <include src="color_settings.js"/> |
1110 <include src="margin_settings.js"/> | 1111 <include src="margin_settings.js"/> |
OLD | NEW |