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

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

Issue 10826214: Fix document size not changing when switching between printers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 8 /**
9 * Interface to the Chromium print preview generator. 9 * Interface to the Chromium print preview generator.
10 * @param {!print_preview.DestinationStore} destinationStore Used to get the 10 * @param {!print_preview.DestinationStore} destinationStore Used to get the
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 ticketStore.isFitToPageEnabled() != this.isFitToPageEnabled_ || 251 ticketStore.isFitToPageEnabled() != this.isFitToPageEnabled_ ||
252 !ticketStore.getPageNumberSet().equals(this.pageNumberSet_) || 252 !ticketStore.getPageNumberSet().equals(this.pageNumberSet_) ||
253 (ticketStore.getMarginsType() != this.marginsType_ && 253 (ticketStore.getMarginsType() != this.marginsType_ &&
254 ticketStore.getMarginsType() != 254 ticketStore.getMarginsType() !=
255 print_preview.ticket_items.MarginsType.Value.CUSTOM) || 255 print_preview.ticket_items.MarginsType.Value.CUSTOM) ||
256 (ticketStore.getMarginsType() == 256 (ticketStore.getMarginsType() ==
257 print_preview.ticket_items.MarginsType.Value.CUSTOM && 257 print_preview.ticket_items.MarginsType.Value.CUSTOM &&
258 !ticketStore.getCustomMargins().equals( 258 !ticketStore.getCustomMargins().equals(
259 ticketStore.getDocumentMargins())) || 259 ticketStore.getDocumentMargins())) ||
260 (this.selectedDestination_ != 260 (this.selectedDestination_ !=
261 this.destinationStore_.selectedDestination && 261 this.destinationStore_.selectedDestination);
262 (this.destinationStore_.selectedDestination.id ==
263 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF ||
264 this.selectedDestination_.id ==
265 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF));
266 }, 262 },
267 263
268 /** 264 /**
269 * Called when the page layout of the document is ready. Always occurs 265 * Called when the page layout of the document is ready. Always occurs
270 * as a result of a preview request. 266 * as a result of a preview request.
271 * @param {cr.Event} event Contains layout info about the document. 267 * @param {cr.Event} event Contains layout info about the document.
272 * @private 268 * @private
273 */ 269 */
274 onPageLayoutReady_: function(event) { 270 onPageLayoutReady_: function(event) {
275 // NOTE: A request ID is not specified, so assuming its for the current 271 // NOTE: A request ID is not specified, so assuming its for the current
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // current one. 380 // current one.
385 cr.dispatchSimpleEvent(this, PreviewGenerator.EventType.FAIL); 381 cr.dispatchSimpleEvent(this, PreviewGenerator.EventType.FAIL);
386 } 382 }
387 }; 383 };
388 384
389 // Export 385 // Export
390 return { 386 return {
391 PreviewGenerator: PreviewGenerator 387 PreviewGenerator: PreviewGenerator
392 }; 388 };
393 }); 389 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698