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

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

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for the failing tests Created 5 years, 4 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
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 /**
188 * Vendor ticket items. 196 * Vendor ticket items.
189 * @type {!print_preview.ticket_items.VendorItems} 197 * @type {!print_preview.ticket_items.VendorItems}
190 * @private 198 * @private
191 */ 199 */
192 this.vendorItems_ = new print_preview.ticket_items.VendorItems( 200 this.vendorItems_ = new print_preview.ticket_items.VendorItems(
193 this.appState_, this.destinationStore_); 201 this.appState_, this.destinationStore_);
194 202
195 /** 203 /**
196 * Keeps track of event listeners for the print ticket store. 204 * Keeps track of event listeners for the print ticket store.
197 * @type {!EventTracker} 205 * @type {!EventTracker}
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 }, 268 },
261 269
262 get fitToPage() { 270 get fitToPage() {
263 return this.fitToPage_; 271 return this.fitToPage_;
264 }, 272 },
265 273
266 get headerFooter() { 274 get headerFooter() {
267 return this.headerFooter_; 275 return this.headerFooter_;
268 }, 276 },
269 277
278 get distillPage() {
279 return this.distillPage_;
280 },
281
270 get mediaSize() { 282 get mediaSize() {
271 return this.mediaSize_; 283 return this.mediaSize_;
272 }, 284 },
273 285
274 get landscape() { 286 get landscape() {
275 return this.landscape_; 287 return this.landscape_;
276 }, 288 },
277 289
278 get marginsType() { 290 get marginsType() {
279 return this.marginsType_; 291 return this.marginsType_;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 onDocumentInfoChange_: function() { 567 onDocumentInfoChange_: function() {
556 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE); 568 cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.DOCUMENT_CHANGE);
557 }, 569 },
558 }; 570 };
559 571
560 // Export 572 // Export
561 return { 573 return {
562 PrintTicketStore: PrintTicketStore 574 PrintTicketStore: PrintTicketStore
563 }; 575 };
564 }); 576 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698