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

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

Issue 2741483002: Check for RPCS printers and return error if Win8+ (Closed)
Patch Set: Fix preview area Created 3 years, 9 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
« no previous file with comments | « no previous file | printing/backend/win_helper.cc » ('j') | printing/backend/win_helper.cc » ('J')
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 /** 5 /**
6 * @typedef {{accessibility: Function, 6 * @typedef {{accessibility: Function,
7 * documentLoadComplete: Function, 7 * documentLoadComplete: Function,
8 * getHeight: Function, 8 * getHeight: Function,
9 * getHorizontalScrollbarThickness: Function, 9 * getHorizontalScrollbarThickness: Function,
10 * getPageLocationNormalized: Function, 10 * getPageLocationNormalized: Function,
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 setPluginKeyEventCallback: function(callback) { 299 setPluginKeyEventCallback: function(callback) {
300 this.keyEventCallback_ = callback; 300 this.keyEventCallback_ = callback;
301 }, 301 },
302 302
303 /** 303 /**
304 * Shows a custom message on the preview area's overlay. 304 * Shows a custom message on the preview area's overlay.
305 * @param {string} message Custom message to show. 305 * @param {string} message Custom message to show.
306 */ 306 */
307 showCustomMessage: function(message) { 307 showCustomMessage: function(message) {
308 this.showMessage_(PreviewArea.MessageId_.CUSTOM, message); 308 this.showMessage_(PreviewArea.MessageId_.CUSTOM, message);
309 if (this.loadingTimeout_) {
dpapad 2017/03/08 23:37:01 The same logic to clear the timeout is repeated in
rbpotter 2017/03/09 00:42:48 Refactored. I moved this into print_preview in on
310 // If this is true another event that triggered a "Preview Loading..."
311 // message arrived just before this one and the timeout will cause
312 // this message to be overwritten when it expires. Clear the timeout
313 // so this doesn't occur.
314 clearTimeout(this.loadingTimeout_);
315 this.loadingTimeout_ = null;
316 }
309 }, 317 },
310 318
311 /** @override */ 319 /** @override */
312 enterDocument: function() { 320 enterDocument: function() {
313 print_preview.Component.prototype.enterDocument.call(this); 321 print_preview.Component.prototype.enterDocument.call(this);
314 322
315 this.tracker.add( 323 this.tracker.add(
316 assert(this.openSystemDialogButton_), 324 assert(this.openSystemDialogButton_),
317 'click', 325 'click',
318 this.onOpenSystemDialogButtonClick_.bind(this)); 326 this.onOpenSystemDialogButtonClick_.bind(this));
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // being draggable. 674 // being draggable.
667 this.plugin_.style.pointerEvents = isDragging ? 'none' : 'auto'; 675 this.plugin_.style.pointerEvents = isDragging ? 'none' : 'auto';
668 } 676 }
669 }; 677 };
670 678
671 // Export 679 // Export
672 return { 680 return {
673 PreviewArea: PreviewArea 681 PreviewArea: PreviewArea
674 }; 682 };
675 }); 683 });
OLDNEW
« no previous file with comments | « no previous file | printing/backend/win_helper.cc » ('j') | printing/backend/win_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698