blob: 7e27504fbe082f1bb32fc24da7867c6ac6840898 [file] [log] [blame]
rockotaf32acb2015-11-13 10:33:59 +09001// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Module "mojo/public/js/support"
6//
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.
9
10while (1);
11
rockot09651e82016-03-09 15:34:52 +090012/* @deprecated Please use watch()/cancelWatch() instead of
13 * asyncWait()/cancelWait().
14 *
rockotaf32acb2015-11-13 10:33:59 +090015 * Waits on the given handle until the state indicated by |signals| is
16 * satisfied.
17 *
18 * @param {MojoHandle} handle The handle to wait on.
19 * @param {MojoHandleSignals} signals Specifies the condition to wait for.
20 * @param {function (mojoResult)} callback Called with the result the wait is
rockot09651e82016-03-09 15:34:52 +090021 * complete. See MojoWait for possible result codes.
rockotaf32acb2015-11-13 10:33:59 +090022 *
23 * @return {MojoWaitId} A waitId that can be passed to cancelWait to cancel the
rockot09651e82016-03-09 15:34:52 +090024 * wait.
rockotaf32acb2015-11-13 10:33:59 +090025 */
26function asyncWait(handle, signals, callback) { [native code] }
27
rockot09651e82016-03-09 15:34:52 +090028/* @deprecated Please use watch()/cancelWatch() instead of
29 * asyncWait()/cancelWait().
30 *
rockotaf32acb2015-11-13 10:33:59 +090031 * Cancels the asyncWait operation specified by the given |waitId|.
rockot09651e82016-03-09 15:34:52 +090032 *
rockotaf32acb2015-11-13 10:33:59 +090033 * @param {MojoWaitId} waitId The waitId returned by asyncWait.
34 */
35function cancelWait(waitId) { [native code] }
rockot09651e82016-03-09 15:34:52 +090036
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 */
47function 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 */
53function cancelWatch(watchId) { [native code] }