OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 callback MojoWatchCallback = void (MojoResult result); | 5 callback MojoWatchCallback = void (MojoResult result); |
6 | 6 |
7 [ | 7 [ |
8 RuntimeEnabled=MojoJS, | 8 RuntimeEnabled=MojoJS, |
9 ] interface MojoHandle { | 9 ] interface MojoHandle { |
10 void close(); | 10 void close(); |
11 [CallWith=ScriptState] MojoWatcher watch(MojoHandleSignals signals, MojoWatc
hCallback callback); | 11 [CallWith=ScriptState] MojoWatcher watch(MojoHandleSignals signals, MojoWatc
hCallback callback); |
| 12 |
| 13 // TODO(alokp): Create MessagePipeHandle, a subclass of MojoHandle |
| 14 // and move the following member functions. |
12 MojoResult writeMessage(BufferSource buffer, sequence<MojoHandle> handles); | 15 MojoResult writeMessage(BufferSource buffer, sequence<MojoHandle> handles); |
13 MojoReadMessageResult readMessage(optional MojoReadMessageFlags flags); | 16 MojoReadMessageResult readMessage(optional MojoReadMessageFlags flags); |
| 17 |
| 18 // TODO(alokp): Create SharedBufferHandle, a subclass of MojoHandle |
| 19 // and move the following member functions. |
| 20 MojoMapBufferResult mapBuffer(unsigned long offset, unsigned long numBytes); |
14 }; | 21 }; |
OLD | NEW |