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 // TODO(rltoscano): Maybe clear print ticket when destination changes. Or | 8 // TODO(rltoscano): Maybe clear print ticket when destination changes. Or |
9 // better yet, carry over any print ticket state that is possible. I.e. if | 9 // better yet, carry over any print ticket state that is possible. I.e. if |
10 // destination changes, the new destination might not support duplex anymore, | 10 // destination changes, the new destination might not support duplex anymore, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 /** | 179 /** |
180 * Print selection only ticket item. | 180 * Print selection only ticket item. |
181 * @type {!print_preview.ticket_items.SelectionOnly} | 181 * @type {!print_preview.ticket_items.SelectionOnly} |
182 * @private | 182 * @private |
183 */ | 183 */ |
184 this.selectionOnly_ = | 184 this.selectionOnly_ = |
185 new print_preview.ticket_items.SelectionOnly(this.documentInfo_); | 185 new print_preview.ticket_items.SelectionOnly(this.documentInfo_); |
186 | 186 |
187 /** | 187 /** |
188 * Print friendly ticket item. | |
189 * @type {!print_preview.ticket_items.DistillPage} | |
190 * @private | |
191 */ | |
192 this.distillPage_ = new print_preview.ticket_items.DistillPage( | |
193 this.documentInfo_); | |
194 | |
195 /** | |
196 * Vendor ticket items. | 188 * Vendor ticket items. |
197 * @type {!print_preview.ticket_items.VendorItems} | 189 * @type {!print_preview.ticket_items.VendorItems} |
198 * @private | 190 * @private |
199 */ | 191 */ |
200 this.vendorItems_ = new print_preview.ticket_items.VendorItems( | 192 this.vendorItems_ = new print_preview.ticket_items.VendorItems( |
201 this.appState_, this.destinationStore_); | 193 this.appState_, this.destinationStore_); |
202 | 194 |
203 /** | 195 /** |
204 * Keeps track of event listeners for the print ticket store. | 196 * Keeps track of event listeners for the print ticket store. |
205 * @type {!EventTracker} | 197 * @type {!EventTracker} |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 }, | 260 }, |
269 | 261 |
270 get fitToPage() { | 262 get fitToPage() { |
271 return this.fitToPage_; | 263 return this.fitToPage_; |
272 }, | 264 }, |
273 | 265 |
274 get headerFooter() { | 266 get headerFooter() { |
275 return this.headerFooter_; | 267 return this.headerFooter_; |
276 }, | 268 }, |
277 | 269 |
278 get distillPage() { | |
279 return this.distillPage_; | |
280 }, | |
281 | |
282 get mediaSize() { | 270 get mediaSize() { |
283 return this.mediaSize_; | 271 return this.mediaSize_; |
284 }, | 272 }, |
285 | 273 |
286 get landscape() { | 274 get landscape() { |
287 return this.landscape_; | 275 return this.landscape_; |
288 }, | 276 }, |
289 | 277 |
290 get marginsType() { | 278 get marginsType() { |
291 return this.marginsType_; | 279 return this.marginsType_; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 onDocumentInfoChange_: function() { | 561 onDocumentInfoChange_: function() { |
574 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE); | 562 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE); |
575 }, | 563 }, |
576 }; | 564 }; |
577 | 565 |
578 // Export | 566 // Export |
579 return { | 567 return { |
580 PrintTicketStore: PrintTicketStore | 568 PrintTicketStore: PrintTicketStore |
581 }; | 569 }; |
582 }); | 570 }); |
OLD | NEW |