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

Unified Diff: mojo/public/js/support.js

Issue 1777673003: [mojo-bindings] Use Watcher API for JS bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « mojo/public/js/connector.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/support.js
diff --git a/mojo/public/js/support.js b/mojo/public/js/support.js
index 025da6c6349589b74025f7fc4b3b6e9ec3c82d65..7e27504fbe082f1bb32fc24da7867c6ac6840898 100644
--- a/mojo/public/js/support.js
+++ b/mojo/public/js/support.js
@@ -9,22 +9,45 @@
while (1);
-/*
+/* @deprecated Please use watch()/cancelWatch() instead of
+ * asyncWait()/cancelWait().
+ *
* Waits on the given handle until the state indicated by |signals| is
* satisfied.
*
* @param {MojoHandle} handle The handle to wait on.
* @param {MojoHandleSignals} signals Specifies the condition to wait for.
* @param {function (mojoResult)} callback Called with the result the wait is
- * complete. See MojoWait for possible result codes.
+ * complete. See MojoWait for possible result codes.
*
* @return {MojoWaitId} A waitId that can be passed to cancelWait to cancel the
- * wait.
+ * wait.
*/
function asyncWait(handle, signals, callback) { [native code] }
-/*
+/* @deprecated Please use watch()/cancelWatch() instead of
+ * asyncWait()/cancelWait().
+ *
* Cancels the asyncWait operation specified by the given |waitId|.
+ *
* @param {MojoWaitId} waitId The waitId returned by asyncWait.
*/
function cancelWait(waitId) { [native code] }
+
+/* Begins watching a handle for |signals| to be satisfied or unsatisfiable.
+ *
+ * @param {MojoHandle} handle The handle to watch.
+ * @param {MojoHandleSignals} signals The signals to watch.
+ * @param {function (mojoResult)} calback Called with a result any time
+ * the watched signals become satisfied or unsatisfiable.
+ *
+ * @param {MojoWatchId} watchId An opaque identifier that identifies this
+ * watch.
+ */
+function watch(handle, signals, callback) { [native code] }
+
+/* Cancels a handle watch initiated by watch().
+ *
+ * @param {MojoWatchId} watchId The watch identifier returned by watch().
+ */
+function cancelWatch(watchId) { [native code] }
« no previous file with comments | « mojo/public/js/connector.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698