OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Represents a single option in the Other Options settings section. | 9 * Represents a single option in the Other Options settings section. |
10 * @param {!print_preview.ticket_items.TicketItem} ticketItem The ticket item | 10 * @param {!print_preview.ticket_items.TicketItem} ticketItem The ticket item |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 * UI component that renders checkboxes for various print options. | 120 * UI component that renders checkboxes for various print options. |
121 * @param {!print_preview.ticket_items.Duplex} duplex Duplex ticket item. | 121 * @param {!print_preview.ticket_items.Duplex} duplex Duplex ticket item. |
122 * @param {!print_preview.ticket_items.FitToPage} fitToPage Fit-to-page ticket | 122 * @param {!print_preview.ticket_items.FitToPage} fitToPage Fit-to-page ticket |
123 * item. | 123 * item. |
124 * @param {!print_preview.ticket_items.CssBackground} cssBackground CSS | 124 * @param {!print_preview.ticket_items.CssBackground} cssBackground CSS |
125 * background ticket item. | 125 * background ticket item. |
126 * @param {!print_preview.ticket_items.SelectionOnly} selectionOnly Selection | 126 * @param {!print_preview.ticket_items.SelectionOnly} selectionOnly Selection |
127 * only ticket item. | 127 * only ticket item. |
128 * @param {!print_preview.ticket_items.HeaderFooter} headerFooter Header | 128 * @param {!print_preview.ticket_items.HeaderFooter} headerFooter Header |
129 * footer ticket item. | 129 * footer ticket item. |
| 130 * @param {!print_preview.ticket_items.Rasterize} rasterize Rasterize ticket |
| 131 * item. |
130 * @constructor | 132 * @constructor |
131 * @extends {print_preview.SettingsSection} | 133 * @extends {print_preview.SettingsSection} |
132 */ | 134 */ |
133 function OtherOptionsSettings( | 135 function OtherOptionsSettings( |
134 duplex, fitToPage, cssBackground, selectionOnly, headerFooter) { | 136 duplex, fitToPage, cssBackground, selectionOnly, headerFooter, |
| 137 rasterize) { |
135 print_preview.SettingsSection.call(this); | 138 print_preview.SettingsSection.call(this); |
136 | 139 |
137 /* | 140 /* |
138 * @private {!Array<!CheckboxTicketItemElement>} checkbox ticket item | 141 * @private {!Array<!CheckboxTicketItemElement>} checkbox ticket item |
139 * elements representing the different options in the section. | 142 * elements representing the different options in the section. |
140 * Selection only must always be the last element in the array. | 143 * Selection only must always be the last element in the array. |
141 */ | 144 */ |
142 this.elements_ = [ | 145 this.elements_ = [ |
143 new CheckboxTicketItemElement(headerFooter, true, | 146 new CheckboxTicketItemElement(headerFooter, true, |
144 'header-footer-container'), | 147 'header-footer-container'), |
145 new CheckboxTicketItemElement(fitToPage, false, | 148 new CheckboxTicketItemElement(fitToPage, false, |
146 'fit-to-page-container'), | 149 'fit-to-page-container'), |
147 new CheckboxTicketItemElement(duplex, false, 'duplex-container'), | 150 new CheckboxTicketItemElement(duplex, false, 'duplex-container'), |
148 new CheckboxTicketItemElement(cssBackground, true, | 151 new CheckboxTicketItemElement(cssBackground, true, |
149 'css-background-container'), | 152 'css-background-container'), |
| 153 new CheckboxTicketItemElement(rasterize, true, 'rasterize-container'), |
150 new CheckboxTicketItemElement(selectionOnly, true, | 154 new CheckboxTicketItemElement(selectionOnly, true, |
151 'selection-only-container') | 155 'selection-only-container') |
152 ]; | 156 ]; |
153 | 157 |
154 }; | 158 }; |
155 | 159 |
156 OtherOptionsSettings.prototype = { | 160 OtherOptionsSettings.prototype = { |
157 __proto__: print_preview.SettingsSection.prototype, | 161 __proto__: print_preview.SettingsSection.prototype, |
158 | 162 |
159 /** @override */ | 163 /** @override */ |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 }, this); | 228 }, this); |
225 }, | 229 }, |
226 | 230 |
227 }; | 231 }; |
228 | 232 |
229 // Export | 233 // Export |
230 return { | 234 return { |
231 OtherOptionsSettings: OtherOptionsSettings | 235 OtherOptionsSettings: OtherOptionsSettings |
232 }; | 236 }; |
233 }); | 237 }); |
OLD | NEW |