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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | printing/backend/win_helper.cc » ('j') | printing/backend/win_helper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/previewarea/preview_area.js
diff --git a/chrome/browser/resources/print_preview/previewarea/preview_area.js b/chrome/browser/resources/print_preview/previewarea/preview_area.js
index ca553a7c7a1102a1c5cf4aee36ab9b713ccaa22f..2954711ca86410c426d2f97fc872d7aca9d99125 100644
--- a/chrome/browser/resources/print_preview/previewarea/preview_area.js
+++ b/chrome/browser/resources/print_preview/previewarea/preview_area.js
@@ -306,6 +306,14 @@ cr.define('print_preview', function() {
*/
showCustomMessage: function(message) {
this.showMessage_(PreviewArea.MessageId_.CUSTOM, message);
+ 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
+ // If this is true another event that triggered a "Preview Loading..."
+ // message arrived just before this one and the timeout will cause
+ // this message to be overwritten when it expires. Clear the timeout
+ // so this doesn't occur.
+ clearTimeout(this.loadingTimeout_);
+ this.loadingTimeout_ = null;
+ }
},
/** @override */
« 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