OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Module "mojo/public/js/support" | 5 // Module "mojo/public/js/support" |
6 // | 6 // |
7 // Note: This file is for documentation purposes only. The code here is not | 7 // Note: This file is for documentation purposes only. The code here is not |
8 // actually executed. The real module is implemented natively in Mojo. | 8 // actually executed. The real module is implemented natively in Mojo. |
9 | 9 |
10 while (1); | 10 while (1); |
11 | 11 |
12 /* | 12 /* @deprecated Please use watch()/cancelWatch() instead of |
| 13 * asyncWait()/cancelWait(). |
| 14 * |
13 * Waits on the given handle until the state indicated by |signals| is | 15 * Waits on the given handle until the state indicated by |signals| is |
14 * satisfied. | 16 * satisfied. |
15 * | 17 * |
16 * @param {MojoHandle} handle The handle to wait on. | 18 * @param {MojoHandle} handle The handle to wait on. |
17 * @param {MojoHandleSignals} signals Specifies the condition to wait for. | 19 * @param {MojoHandleSignals} signals Specifies the condition to wait for. |
18 * @param {function (mojoResult)} callback Called with the result the wait is | 20 * @param {function (mojoResult)} callback Called with the result the wait is |
19 * complete. See MojoWait for possible result codes. | 21 * complete. See MojoWait for possible result codes. |
20 * | 22 * |
21 * @return {MojoWaitId} A waitId that can be passed to cancelWait to cancel the | 23 * @return {MojoWaitId} A waitId that can be passed to cancelWait to cancel the |
22 * wait. | 24 * wait. |
23 */ | 25 */ |
24 function asyncWait(handle, signals, callback) { [native code] } | 26 function asyncWait(handle, signals, callback) { [native code] } |
25 | 27 |
26 /* | 28 /* @deprecated Please use watch()/cancelWatch() instead of |
| 29 * asyncWait()/cancelWait(). |
| 30 * |
27 * Cancels the asyncWait operation specified by the given |waitId|. | 31 * Cancels the asyncWait operation specified by the given |waitId|. |
| 32 * |
28 * @param {MojoWaitId} waitId The waitId returned by asyncWait. | 33 * @param {MojoWaitId} waitId The waitId returned by asyncWait. |
29 */ | 34 */ |
30 function cancelWait(waitId) { [native code] } | 35 function cancelWait(waitId) { [native code] } |
| 36 |
| 37 /* Begins watching a handle for |signals| to be satisfied or unsatisfiable. |
| 38 * |
| 39 * @param {MojoHandle} handle The handle to watch. |
| 40 * @param {MojoHandleSignals} signals The signals to watch. |
| 41 * @param {function (mojoResult)} calback Called with a result any time |
| 42 * the watched signals become satisfied or unsatisfiable. |
| 43 * |
| 44 * @param {MojoWatchId} watchId An opaque identifier that identifies this |
| 45 * watch. |
| 46 */ |
| 47 function watch(handle, signals, callback) { [native code] } |
| 48 |
| 49 /* Cancels a handle watch initiated by watch(). |
| 50 * |
| 51 * @param {MojoWatchId} watchId The watch identifier returned by watch(). |
| 52 */ |
| 53 function cancelWatch(watchId) { [native code] } |
OLD | NEW |