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

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: Rebase + Ready for Check-in 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
« no previous file with comments | « remoting/webapp/base/js/application.js ('k') | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/base.js
diff --git a/remoting/webapp/base/js/base.js b/remoting/webapp/base/js/base.js
index 6f4ae0528190051856439efe1b60cbbf1a9dfcd8..35012eacfd154a953a39c6f53bae8ce6d342998d 100644
--- a/remoting/webapp/base/js/base.js
+++ b/remoting/webapp/base/js/base.js
@@ -534,7 +534,7 @@ base.EventSourceImpl.prototype = {
*
* @param {base.EventSource} src
* @param {string} eventName
- * @param {function(...?)} listener
+ * @param {Function} listener
*
* @constructor
* @implements {base.Disposable}
@@ -553,9 +553,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
@@ -578,7 +578,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}
@@ -593,6 +593,21 @@ 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) {
+ /** @private */
+ this.intervalId_ = window.setInterval(callback, interval);
+};
+
+base.RepeatingTimer.prototype.dispose = function() {
+ window.clearInterval(this.intervalId_);
+ this.intervalId_ = null;
+};
/**
* Converts UTF-8 string to ArrayBuffer.
« no previous file with comments | « remoting/webapp/base/js/application.js ('k') | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698