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

Side by Side Diff: chrome/browser/resources/print_preview/previewarea/preview_area.js

Issue 10450022: Print Preview Print Destination Search Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Set --bary flag Created 8 years, 6 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 /** 8 /**
9 * Creates a PreviewArea object. It represents the area where the preview 9 * Creates a PreviewArea object. It represents the area where the preview
10 * document is displayed. 10 * document is displayed.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 /** 88 /**
89 * Whether the document preview is ready. 89 * Whether the document preview is ready.
90 * @type {boolean} 90 * @type {boolean}
91 * @private 91 * @private
92 */ 92 */
93 this.isDocumentReady_ = false; 93 this.isDocumentReady_ = false;
94 94
95 /** 95 /**
96 * Timeout object used to display a loading message if the preview is taking 96 * Timeout object used to display a loading message if the preview is taking
97 * a long time to generate. 97 * a long time to generate.
98 * @type {Object} 98 * @type {?number}
99 * @private 99 * @private
100 */ 100 */
101 this.loadingTimeout_ = null; 101 this.loadingTimeout_ = null;
102 102
103 /** 103 /**
104 * Overlay element. 104 * Overlay element.
105 * @type {HTMLElement} 105 * @type {HTMLElement}
106 * @private 106 * @private
107 */ 107 */
108 this.overlayEl_ = null; 108 this.overlayEl_ = null;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 compatObj.getVerticalScrollbarThickness && 345 compatObj.getVerticalScrollbarThickness &&
346 compatObj.getPageLocationNormalized && 346 compatObj.getPageLocationNormalized &&
347 compatObj.getHeight && 347 compatObj.getHeight &&
348 compatObj.getWidth; 348 compatObj.getWidth;
349 compatObj.parentElement.removeChild(compatObj); 349 compatObj.parentElement.removeChild(compatObj);
350 return isCompatible; 350 return isCompatible;
351 }, 351 },
352 352
353 /** 353 /**
354 * Shows a given message on the overlay. 354 * Shows a given message on the overlay.
355 * @param {print_preview.PreviewArea.MessageId_} messageId ID of the message 355 * @param {!print_preview.PreviewArea.MessageId_} messageId ID of the
356 * to show. 356 * message to show.
357 * @param {string=} opt_message Optional message to show that can be used 357 * @param {string=} opt_message Optional message to show that can be used
358 * by some message IDs. 358 * by some message IDs.
359 * @private 359 * @private
360 */ 360 */
361 showMessage_: function(messageId, opt_message) { 361 showMessage_: function(messageId, opt_message) {
362 // Hide all messages. 362 // Hide all messages.
363 var messageEls = this.getElement().getElementsByClassName( 363 var messageEls = this.getElement().getElementsByClassName(
364 PreviewArea.Classes_.MESSAGE); 364 PreviewArea.Classes_.MESSAGE);
365 for (var i = 0, messageEl; messageEl = messageEls[i]; i++) { 365 for (var i = 0, messageEl; messageEl = messageEls[i]; i++) {
366 setIsVisible(messageEl, false); 366 setIsVisible(messageEl, false);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 pluginWidth - this.plugin_.getVerticalScrollbarThickness(), 583 pluginWidth - this.plugin_.getVerticalScrollbarThickness(),
584 pluginHeight - this.plugin_.getHorizontalScrollbarThickness())); 584 pluginHeight - this.plugin_.getHorizontalScrollbarThickness()));
585 } 585 }
586 }; 586 };
587 587
588 // Export 588 // Export
589 return { 589 return {
590 PreviewArea: PreviewArea 590 PreviewArea: PreviewArea
591 }; 591 };
592 }); 592 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698