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

Unified Diff: remoting/webapp/js_proto/base_proto.js

Issue 245923002: Bring events to JavaScript components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add base.js and Event Listeners Created 6 years, 8 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
« remoting/webapp/base.js ('K') | « remoting/webapp/base.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/js_proto/base_proto.js
diff --git a/remoting/webapp/js_proto/base_proto.js b/remoting/webapp/js_proto/base_proto.js
new file mode 100644
index 0000000000000000000000000000000000000000..dcdf3e694530a28e5705bb7259d7410c3e2f5c3d
--- /dev/null
+++ b/remoting/webapp/js_proto/base_proto.js
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file contains various hacks needed to inform JSCompiler of various
+// properties and methods defined in base.js. It is used only with
+// JSCompiler to verify the type-correctness of our code.
Jamie 2014/04/22 01:23:21 This should not be necessary. We have proto files
kelvinp 2014/04/23 00:24:20 Done.
+
+/** @constructor */
+function EventEntry () {}
+
+/** @param {Array.<function(?=)>} listeners */
+EventEntry.prototype.listeners = null;
+/** @param {boolean} sweepRequired */
+EventEntry.prototype.sweepRequired = null;
+/** @param {number} recursionCount */
+EventEntry.prototype.recursionCount = null;
+
+/** @constructor */
+function EventSource () {}
+
+/** @type {Object.<string, EventEntry>} */
+EventSource.prototype._ev = null;
+
+/**
+ * @param {string} type
+ * @param {function(?=)} fn
+ * @param {*} thisObj
+ */
+EventSource.prototype.addEventListener = function (type, fn, thisObj) {};
+
+/**
+ * @param {string} type
+ * @param {function(?=)} fn
+ * @param {*} thisObj
+ */
+EventSource.prototype.removeEventListener = function (type, fn, thisObj) {};
+
+/**
+ * @param {string} type
+ * @param {?} data
+ */
+EventSource.prototype.raiseEvent = function (type, data) {};
+
+/** @param {Array.<string>} evts */
+EventSource.prototype.defineEvents = function (evts) {};
+
+/**
+ * @interface
+ */
+function Disposable () {}
+Disposable.prototype.dispose = function () {};
« remoting/webapp/base.js ('K') | « remoting/webapp/base.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698