| 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/public/platform/native/system_impl_private_thunks.h" | 5 #include "mojo/public/platform/native/system_impl_private_thunks.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 | 8 |
| 9 #include "mojo/public/platform/native/thunk_export.h" | 9 #include "mojo/public/platform/native/thunk_export.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 MojoTimeTicks MojoSystemImplGetTimeTicksNow(MojoSystemImpl system) { | 34 MojoTimeTicks MojoSystemImplGetTimeTicksNow(MojoSystemImpl system) { |
| 35 assert(g_system_impl_thunks.GetTimeTicksNow); | 35 assert(g_system_impl_thunks.GetTimeTicksNow); |
| 36 return g_system_impl_thunks.GetTimeTicksNow(system); | 36 return g_system_impl_thunks.GetTimeTicksNow(system); |
| 37 } | 37 } |
| 38 | 38 |
| 39 MojoResult MojoSystemImplClose(MojoSystemImpl system, MojoHandle handle) { | 39 MojoResult MojoSystemImplClose(MojoSystemImpl system, MojoHandle handle) { |
| 40 assert(g_system_impl_thunks.Close); | 40 assert(g_system_impl_thunks.Close); |
| 41 return g_system_impl_thunks.Close(system, handle); | 41 return g_system_impl_thunks.Close(system, handle); |
| 42 } | 42 } |
| 43 | 43 |
| 44 MojoResult MojoSystemImplGetRights(MojoSystemImpl system, |
| 45 MojoHandle handle, |
| 46 MojoHandleRights* rights) { |
| 47 assert(g_system_impl_thunks.GetRights); |
| 48 return g_system_impl_thunks.GetRights(system, handle, rights); |
| 49 } |
| 50 |
| 44 MojoResult MojoSystemImplWait(MojoSystemImpl system, | 51 MojoResult MojoSystemImplWait(MojoSystemImpl system, |
| 45 MojoHandle handle, | 52 MojoHandle handle, |
| 46 MojoHandleSignals signals, | 53 MojoHandleSignals signals, |
| 47 MojoDeadline deadline, | 54 MojoDeadline deadline, |
| 48 struct MojoHandleSignalsState* signals_state) { | 55 struct MojoHandleSignalsState* signals_state) { |
| 49 assert(g_system_impl_thunks.Wait); | 56 assert(g_system_impl_thunks.Wait); |
| 50 return g_system_impl_thunks.Wait(system, handle, signals, deadline, | 57 return g_system_impl_thunks.Wait(system, handle, signals, deadline, |
| 51 signals_state); | 58 signals_state); |
| 52 } | 59 } |
| 53 | 60 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 g_system_impl_control_thunks = *system_thunks; | 263 g_system_impl_control_thunks = *system_thunks; |
| 257 return sizeof(g_system_impl_control_thunks); | 264 return sizeof(g_system_impl_control_thunks); |
| 258 } | 265 } |
| 259 | 266 |
| 260 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate( | 267 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate( |
| 261 const struct MojoSystemImplThunksPrivate* system_thunks) { | 268 const struct MojoSystemImplThunksPrivate* system_thunks) { |
| 262 if (system_thunks->size >= sizeof(g_system_impl_thunks)) | 269 if (system_thunks->size >= sizeof(g_system_impl_thunks)) |
| 263 g_system_impl_thunks = *system_thunks; | 270 g_system_impl_thunks = *system_thunks; |
| 264 return sizeof(g_system_impl_thunks); | 271 return sizeof(g_system_impl_thunks); |
| 265 } | 272 } |
| OLD | NEW |