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

Unified Diff: remoting/webapp/base/js/base.js

Issue 952353002: Requiem for client_screen.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: remoting/webapp/base/js/base.js
diff --git a/remoting/webapp/base/js/base.js b/remoting/webapp/base/js/base.js
index d3599a56911d814fe2a3bff8dc09a4a9e3266b84..baa3cba80ab0b907eb08adefe7ec6884d8715053 100644
--- a/remoting/webapp/base/js/base.js
+++ b/remoting/webapp/base/js/base.js
@@ -507,7 +507,7 @@ base.EventSourceImpl.prototype = {
*
* @param {base.EventSource} src
* @param {string} eventName
- * @param {function(...?)} listener
+ * @param {Function} listener
*
* @constructor
* @implements {base.Disposable}
@@ -526,9 +526,9 @@ base.EventHook.prototype.dispose = function() {
/**
* An event hook implementation for DOM Events.
*
- * @param {HTMLElement|Element} src
+ * @param {HTMLElement|Element|Window|HTMLDocument} src
* @param {string} eventName
- * @param {function(...?)} listener
+ * @param {Function} listener
* @param {boolean} capture
*
* @constructor
@@ -551,7 +551,7 @@ base.DomEventHook.prototype.dispose = function() {
* An event hook implementation for Chrome Events.
*
* @param {chrome.Event} src
- * @param {function(...?)} listener
+ * @param {Function} listener
*
* @constructor
* @implements {base.Disposable}
@@ -566,6 +566,20 @@ base.ChromeEventHook.prototype.dispose = function() {
this.src_.removeListener(this.listener_);
};
+/**
+ * A disposable repeating timer.
+ *
+ * @constructor
+ * @implements {base.Disposable}
+ */
+base.RepeatingTimer = function(/** Function */callback, /** number */interval) {
+ this.intervalId_ = window.setInterval(callback, interval);
+};
+
+base.RepeatingTimer.prototype.dispose = function() {
+ window.clearInterval(this.intervalId_);
+ this.intervalId_ = null;
+};
/**
* Converts UTF-8 string to ArrayBuffer.

Powered by Google App Engine
This is Rietveld 408576698