Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h" | 5 #include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h" |
| 6 | 6 |
| 7 #include "mojo/public/c/system/functions.h" | 7 #include "mojo/public/c/system/functions.h" |
| 8 #include "mojo/public/platform/nacl/mgl_irt.h" | 8 #include "mojo/public/platform/nacl/mgl_irt.h" |
| 9 #include "mojo/public/platform/nacl/mojo_irt.h" | 9 #include "mojo/public/platform/nacl/mojo_irt.h" |
| 10 #include "native_client/src/public/irt_core.h" | 10 #include "native_client/src/public/irt_core.h" |
| 11 #include "native_client/src/untrusted/irt/irt_dev.h" | 11 #include "native_client/src/untrusted/irt/irt_dev.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; | 15 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; |
| 16 bool g_running_translator = false; | 16 bool g_running_translator = false; |
| 17 | 17 |
| 18 const struct nacl_irt_mojo kIrtMojo = { | 18 const struct nacl_irt_mojo kIrtMojo = { |
| 19 MojoCreateSharedBuffer, | 19 nacl::MojoGetInitialHandle, |
|
viettrungluu
2016/03/09 00:51:04
This had to be reordered to match the reordering o
Sean Klein
2016/03/09 22:18:22
The Non-SFI and SFI implementations may not always
| |
| 20 MojoDuplicateBufferHandle, | |
| 21 MojoMapBuffer, | |
| 22 MojoUnmapBuffer, | |
| 23 MojoCreateDataPipe, | |
| 24 MojoWriteData, | |
| 25 MojoBeginWriteData, | |
| 26 MojoEndWriteData, | |
| 27 MojoReadData, | |
| 28 MojoBeginReadData, | |
| 29 MojoEndReadData, | |
| 30 MojoGetTimeTicksNow, | 20 MojoGetTimeTicksNow, |
| 31 MojoClose, | 21 MojoClose, |
| 32 MojoWait, | 22 MojoWait, |
| 33 MojoWaitMany, | 23 MojoWaitMany, |
| 34 MojoCreateMessagePipe, | 24 MojoCreateMessagePipe, |
| 35 MojoWriteMessage, | 25 MojoWriteMessage, |
| 36 MojoReadMessage, | 26 MojoReadMessage, |
| 37 nacl::MojoGetInitialHandle, | 27 MojoCreateDataPipe, |
| 28 MojoWriteData, | |
| 29 MojoBeginWriteData, | |
| 30 MojoEndWriteData, | |
| 31 MojoReadData, | |
| 32 MojoBeginReadData, | |
| 33 MojoEndReadData, | |
| 34 MojoCreateSharedBuffer, | |
| 35 MojoDuplicateBufferHandle, | |
| 36 MojoGetBufferInformation, | |
| 37 MojoMapBuffer, | |
| 38 MojoUnmapBuffer, | |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 const struct nacl_irt_mgl kIrtMGL = { | 41 const struct nacl_irt_mgl kIrtMGL = { |
| 41 MGLCreateContext, | 42 MGLCreateContext, |
| 42 MGLDestroyContext, | 43 MGLDestroyContext, |
| 43 MGLMakeCurrent, | 44 MGLMakeCurrent, |
| 44 MGLGetCurrentContext, | 45 MGLGetCurrentContext, |
| 45 MGLGetProcAddress, | 46 MGLGetProcAddress, |
| 46 }; | 47 }; |
| 47 | 48 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 void* table, | 118 void* table, |
| 118 size_t tablesize) { | 119 size_t tablesize) { |
| 119 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, | 120 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, |
| 120 kIrtInterfaces, sizeof(kIrtInterfaces)); | 121 kIrtInterfaces, sizeof(kIrtInterfaces)); |
| 121 if (result != 0) | 122 if (result != 0) |
| 122 return result; | 123 return result; |
| 123 return nacl_irt_query_core(interface_ident, table, tablesize); | 124 return nacl_irt_query_core(interface_ident, table, tablesize); |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace nacl | 127 } // namespace nacl |
| OLD | NEW |