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

Unified Diff: remoting/webapp/app_remoting/js/idle_detector.js

Issue 1143453007: remoting.WindowShape clean up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 7 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 | « remoting/webapp/app_remoting/js/context_menu_dom.js ('k') | remoting/webapp/base/js/connection_stats.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/app_remoting/js/idle_detector.js
diff --git a/remoting/webapp/app_remoting/js/idle_detector.js b/remoting/webapp/app_remoting/js/idle_detector.js
index c92d94aed91b61fc8e7e92a9c95805425bc6ee0c..98242ccca8803508afd614908ecd5686cf8007a0 100644
--- a/remoting/webapp/app_remoting/js/idle_detector.js
+++ b/remoting/webapp/app_remoting/js/idle_detector.js
@@ -54,8 +54,6 @@ remoting.IdleDetector = function(idleWarning, callback) {
cont.addEventListener('click', this.onContinue_.bind(this), false);
var quit = this.idleWarning_.querySelector('.idle-dialog-disconnect');
quit.addEventListener('click', this.onDisconnect_.bind(this), false);
-
- remoting.windowShape.addCallback(this);
this.resetTimeout_();
};
@@ -140,8 +138,12 @@ remoting.IdleDetector.prototype.onDisconnect_ = function() {
*/
remoting.IdleDetector.prototype.showIdleWarning_ = function(show) {
this.idleWarning_.hidden = !show;
- remoting.windowShape.updateClientWindowShape();
-}
+ if (show) {
+ remoting.windowShape.registerClientUI(this);
+ } else {
+ remoting.windowShape.unregisterClientUI(this);
+ }
+};
/**
* @param {Array<{left: number, top: number, width: number, height: number}>}
« no previous file with comments | « remoting/webapp/app_remoting/js/context_menu_dom.js ('k') | remoting/webapp/base/js/connection_stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698