| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "mojo/edk/embedder/embedder_internal.h" | 6 #include "mojo/edk/embedder/embedder_internal.h" |
| 7 #include "mojo/edk/system/core.h" | 7 #include "mojo/edk/system/core.h" |
| 8 #include "mojo/edk/system/dispatcher.h" | 8 #include "mojo/edk/system/dispatcher.h" |
| 9 #include "mojo/edk/system/handle.h" | 9 #include "mojo/edk/system/handle.h" |
| 10 #include "mojo/edk/util/ref_ptr.h" | 10 #include "mojo/edk/util/ref_ptr.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 DCHECK(core); | 85 DCHECK(core); |
| 86 return core->GetTimeTicksNow(); | 86 return core->GetTimeTicksNow(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 MojoResult MojoSystemImplClose(MojoSystemImpl system, MojoHandle handle) { | 89 MojoResult MojoSystemImplClose(MojoSystemImpl system, MojoHandle handle) { |
| 90 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); | 90 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); |
| 91 DCHECK(core); | 91 DCHECK(core); |
| 92 return core->Close(handle); | 92 return core->Close(handle); |
| 93 } | 93 } |
| 94 | 94 |
| 95 MojoResult MojoSystemImplGetRights(MojoSystemImpl system, |
| 96 MojoHandle handle, |
| 97 MojoHandleRights* rights) { |
| 98 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); |
| 99 DCHECK(core); |
| 100 return core->GetRights(handle, MakeUserPointer(rights)); |
| 101 } |
| 102 |
| 95 MojoResult MojoSystemImplWait(MojoSystemImpl system, | 103 MojoResult MojoSystemImplWait(MojoSystemImpl system, |
| 96 MojoHandle handle, | 104 MojoHandle handle, |
| 97 MojoHandleSignals signals, | 105 MojoHandleSignals signals, |
| 98 MojoDeadline deadline, | 106 MojoDeadline deadline, |
| 99 MojoHandleSignalsState* signals_state) { | 107 MojoHandleSignalsState* signals_state) { |
| 100 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); | 108 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); |
| 101 DCHECK(core); | 109 DCHECK(core); |
| 102 return core->Wait(handle, signals, deadline, MakeUserPointer(signals_state)); | 110 return core->Wait(handle, signals, deadline, MakeUserPointer(signals_state)); |
| 103 } | 111 } |
| 104 | 112 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 MakeUserPointer(buffer), flags); | 323 MakeUserPointer(buffer), flags); |
| 316 } | 324 } |
| 317 | 325 |
| 318 MojoResult MojoSystemImplUnmapBuffer(MojoSystemImpl system, void* buffer) { | 326 MojoResult MojoSystemImplUnmapBuffer(MojoSystemImpl system, void* buffer) { |
| 319 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); | 327 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); |
| 320 DCHECK(core); | 328 DCHECK(core); |
| 321 return core->UnmapBuffer(MakeUserPointer(buffer)); | 329 return core->UnmapBuffer(MakeUserPointer(buffer)); |
| 322 } | 330 } |
| 323 | 331 |
| 324 } // extern "C" | 332 } // extern "C" |
| OLD | NEW |