Chromium Code Reviews| 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 | 12 |
| 13 // TODO(alokp): Create MessagePipeHandle, a subclass of MojoHandle | 13 // TODO(alokp): Create MessagePipeHandle, a subclass of MojoHandle |
| 14 // and move the following member functions. | 14 // and move the following member functions. |
| 15 MojoResult writeMessage(BufferSource buffer, sequence<MojoHandle> handles); | 15 MojoResult writeMessage(BufferSource buffer, sequence<MojoHandle> handles); |
| 16 MojoReadMessageResult readMessage(optional MojoReadMessageFlags flags); | 16 MojoReadMessageResult readMessage(optional MojoReadMessageFlags flags); |
| 17 | 17 |
| 18 // TODO(alokp): Create DataPipeHandle, a subclass of MojoHandle | |
| 19 // and move the following member functions. | |
| 20 MojoWriteDataResult writeData(BufferSource buffer, optional MojoWriteDataFla gs flags); | |
|
yzshen1
2017/03/07 17:56:39
Is it the plan to add two-phase read/write in a fo
alokp
2017/03/07 19:34:20
Do you mean MojoBegin[End]ReadData? If so, yes we
| |
| 21 MojoReadDataResult readData(MojoReadDataFlags flags, optional unsigned long numBytes, optional BufferSource buffer); | |
|
alokp
2017/03/07 05:48:58
yzshen/jbroman: MojoReadData is pretty heavily ove
jbroman
2017/03/07 16:01:44
I don't feel strongly here.
To me this is a sligh
yzshen1
2017/03/07 17:56:39
I am fine with this. +CC rockot for API discussion
Ken Rockot(use gerrit already)
2017/03/07 18:09:51
Seems reasonable to me.
alokp
2017/03/07 19:34:20
Thanks for the feedback. I split readData into thr
| |
| 22 | |
| 18 // TODO(alokp): Create SharedBufferHandle, a subclass of MojoHandle | 23 // TODO(alokp): Create SharedBufferHandle, a subclass of MojoHandle |
| 19 // and move the following member functions. | 24 // and move the following member functions. |
| 20 MojoMapBufferResult mapBuffer(unsigned long offset, unsigned long numBytes); | 25 MojoMapBufferResult mapBuffer(unsigned long offset, unsigned long numBytes); |
| 21 MojoCreateSharedBufferResult duplicateBufferHandle(optional MojoDuplicateBuf ferHandleOptions options); | 26 MojoCreateSharedBufferResult duplicateBufferHandle(optional MojoDuplicateBuf ferHandleOptions options); |
| 22 }; | 27 }; |
| OLD | NEW |