| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 'pageRange': pageSettings.selectedPageRanges, | 348 'pageRange': pageSettings.selectedPageRanges, |
| 349 'duplex': copiesSettings.duplexMode, | 349 'duplex': copiesSettings.duplexMode, |
| 350 'copies': copiesSettings.numberOfCopies, | 350 'copies': copiesSettings.numberOfCopies, |
| 351 'collate': copiesSettings.isCollated(), | 351 'collate': copiesSettings.isCollated(), |
| 352 'landscape': layoutSettings.isLandscape(), | 352 'landscape': layoutSettings.isLandscape(), |
| 353 'color': colorSettings.colorMode, | 353 'color': colorSettings.colorMode, |
| 354 'printToPDF': printToPDF, | 354 'printToPDF': printToPDF, |
| 355 'printWithCloudPrint': printWithCloudPrint, | 355 'printWithCloudPrint': printWithCloudPrint, |
| 356 'isFirstRequest' : false, | 356 'isFirstRequest' : false, |
| 357 'headerFooterEnabled': headerFooterSettings.hasHeaderFooter(), | 357 'headerFooterEnabled': headerFooterSettings.hasHeaderFooter(), |
| 358 'defaultMarginsSelected': marginSettings.isDefaultMarginsSelected(), | 358 'marginsType': marginSettings.selectedMarginsAsString, |
| 359 'margins': marginSettings.customMargins, | |
| 360 'requestID': -1, | 359 'requestID': -1, |
| 361 'generateDraftData': generateDraftData}; | 360 'generateDraftData': generateDraftData}; |
| 362 | 361 |
| 362 if (marginSettings.isCustomMarginsSelected()) |
| 363 settings['marginsCustom'] = marginSettings.customMargins; |
| 364 |
| 363 var printerList = $('printer-list'); | 365 var printerList = $('printer-list'); |
| 364 var selectedPrinter = printerList.selectedIndex; | 366 var selectedPrinter = printerList.selectedIndex; |
| 365 if (cloudprint.isCloudPrint(printerList.options[selectedPrinter])) { | 367 if (cloudprint.isCloudPrint(printerList.options[selectedPrinter])) { |
| 366 settings['cloudPrintID'] = | 368 settings['cloudPrintID'] = |
| 367 printerList.options[selectedPrinter].value; | 369 printerList.options[selectedPrinter].value; |
| 368 } | 370 } |
| 369 return settings; | 371 return settings; |
| 370 } | 372 } |
| 371 | 373 |
| 372 /** | 374 /** |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 <include src="copies_settings.js"/> | 1107 <include src="copies_settings.js"/> |
| 1106 <include src="header_footer_settings.js"/> | 1108 <include src="header_footer_settings.js"/> |
| 1107 <include src="layout_settings.js"/> | 1109 <include src="layout_settings.js"/> |
| 1108 <include src="color_settings.js"/> | 1110 <include src="color_settings.js"/> |
| 1109 <include src="margin_settings.js"/> | 1111 <include src="margin_settings.js"/> |
| 1110 <include src="margin_textbox.js"/> | 1112 <include src="margin_textbox.js"/> |
| 1111 <include src="margin_line.js"/> | 1113 <include src="margin_line.js"/> |
| 1112 <include src="margin_utils.js"/> | 1114 <include src="margin_utils.js"/> |
| 1113 <include src="margins_ui.js"/> | 1115 <include src="margins_ui.js"/> |
| 1114 <include src="preview_area.js"/> | 1116 <include src="preview_area.js"/> |
| OLD | NEW |