| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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 part of internal; | |
| 6 | |
| 7 class MojoHandleNatives { | |
| 8 static int register( | |
| 9 Object eventStream, int handle) native "MojoHandle_Register"; | |
| 10 static int close(int handle) native "MojoHandle_Close"; | |
| 11 static List wait( | |
| 12 int handle, int signals, int deadline) native "MojoHandle_Wait"; | |
| 13 static List waitMany(List<int> handles, List<int> signals, | |
| 14 int deadline) native "MojoHandle_WaitMany"; | |
| 15 } | |
| 16 | |
| 17 class MojoHandleWatcherNatives { | |
| 18 static int sendControlData(int controlHandle, int mojoHandle, SendPort port, | |
| 19 int data) native "MojoHandleWatcher_SendControlData"; | |
| 20 static List recvControlData( | |
| 21 int controlHandle) native "MojoHandleWatcher_RecvControlData"; | |
| 22 static int setControlHandle( | |
| 23 int controlHandle) native "MojoHandleWatcher_SetControlHandle"; | |
| 24 static int getControlHandle() native "MojoHandleWatcher_GetControlHandle"; | |
| 25 } | |
| 26 | |
| 27 class MojoMessagePipeNatives { | |
| 28 static List MojoCreateMessagePipe(int flags) native "MojoMessagePipe_Create"; | |
| 29 | |
| 30 static int MojoWriteMessage(int handle, ByteData data, int numBytes, | |
| 31 List<int> handles, int flags) native "MojoMessagePipe_Write"; | |
| 32 | |
| 33 static List MojoReadMessage(int handle, ByteData data, int numBytes, | |
| 34 List<int> handles, int flags) native "MojoMessagePipe_Read"; | |
| 35 } | |
| 36 | |
| 37 class MojoDataPipeNatives { | |
| 38 static List MojoCreateDataPipe(int elementBytes, int capacityBytes, | |
| 39 int flags) native "MojoDataPipe_Create"; | |
| 40 | |
| 41 static List MojoWriteData(int handle, ByteData data, int numBytes, | |
| 42 int flags) native "MojoDataPipe_WriteData"; | |
| 43 | |
| 44 static List MojoBeginWriteData(int handle, int bufferBytes, | |
| 45 int flags) native "MojoDataPipe_BeginWriteData"; | |
| 46 | |
| 47 static int MojoEndWriteData( | |
| 48 int handle, int bytesWritten) native "MojoDataPipe_EndWriteData"; | |
| 49 | |
| 50 static List MojoReadData(int handle, ByteData data, int numBytes, | |
| 51 int flags) native "MojoDataPipe_ReadData"; | |
| 52 | |
| 53 static List MojoBeginReadData(int handle, int bufferBytes, | |
| 54 int flags) native "MojoDataPipe_BeginReadData"; | |
| 55 | |
| 56 static int MojoEndReadData( | |
| 57 int handle, int bytesRead) native "MojoDataPipe_EndReadData"; | |
| 58 } | |
| 59 | |
| 60 class MojoSharedBufferNatives { | |
| 61 static List Create(int numBytes, int flags) native "MojoSharedBuffer_Create"; | |
| 62 | |
| 63 static List Duplicate( | |
| 64 int bufferHandle, int flags) native "MojoSharedBuffer_Duplicate"; | |
| 65 | |
| 66 static List Map(Object buffer, int bufferHandle, int offset, int numBytes, | |
| 67 int flags) native "MojoSharedBuffer_Map"; | |
| 68 | |
| 69 static int Unmap(ByteData buffer) native "MojoSharedBuffer_Unmap"; | |
| 70 } | |
| OLD | NEW |