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

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

Issue 2524143003: Print Preview: Add option to rasterize PDFs and add JPEG compression. (Closed)
Patch Set: Clean up JS Created 4 years 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
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 /** 104 /**
105 * Page range ticket item. 105 * Page range ticket item.
106 * @type {!print_preview.ticket_items.PageRange} 106 * @type {!print_preview.ticket_items.PageRange}
107 * @private 107 * @private
108 */ 108 */
109 this.pageRange_ = 109 this.pageRange_ =
110 new print_preview.ticket_items.PageRange(this.documentInfo_); 110 new print_preview.ticket_items.PageRange(this.documentInfo_);
111 111
112 /** 112 /**
113 * Rasterize PDF ticket item.
114 * @type {!print_preview.ticket_items.Rasterize}
115 * @private
116 */
117 this.rasterize_ = new print_preview.ticket_items.Rasterize(
118 this.destinationStore_, this.documentInfo_);
119
120 /**
113 * Scaling ticket item. 121 * Scaling ticket item.
114 * @type {!print_preview.ticket_items.Scaling} 122 * @type {!print_preview.ticket_items.Scaling}
115 * @private 123 * @private
116 */ 124 */
117 this.scaling_ = new print_preview.ticket_items.Scaling( 125 this.scaling_ = new print_preview.ticket_items.Scaling(
118 this.appState_, this.destinationStore_, this.documentInfo_); 126 this.appState_, this.destinationStore_, this.documentInfo_);
119 127
120 /** 128 /**
121 * Custom margins ticket item. 129 * Custom margins ticket item.
122 * @type {!print_preview.ticket_items.CustomMargins} 130 * @type {!print_preview.ticket_items.CustomMargins}
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 }, 292 },
285 293
286 get marginsType() { 294 get marginsType() {
287 return this.marginsType_; 295 return this.marginsType_;
288 }, 296 },
289 297
290 get pageRange() { 298 get pageRange() {
291 return this.pageRange_; 299 return this.pageRange_;
292 }, 300 },
293 301
302 get rasterize() {
303 return this.rasterize_;
304 },
305
294 get scaling() { 306 get scaling() {
295 return this.scaling_; 307 return this.scaling_;
296 }, 308 },
297 309
298 get selectionOnly() { 310 get selectionOnly() {
299 return this.selectionOnly_; 311 return this.selectionOnly_;
300 }, 312 },
301 313
302 get vendorItems() { 314 get vendorItems() {
303 return this.vendorItems_; 315 return this.vendorItems_;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 onDocumentInfoChange_: function() { 591 onDocumentInfoChange_: function() {
580 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE); 592 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE);
581 }, 593 },
582 }; 594 };
583 595
584 // Export 596 // Export
585 return { 597 return {
586 PrintTicketStore: PrintTicketStore 598 PrintTicketStore: PrintTicketStore
587 }; 599 };
588 }); 600 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698