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

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

Issue 8227034: Change print setting conventions for margins to support more options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile Created 9 years, 2 months 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
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.selectedMarginsValue,
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
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"/>
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/margin_settings.js ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698