Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Side by Side Diff: mojo/edk/embedder/entrypoints.cc

Issue 1995753002: [mojo-edk] Expose portable API for platform handle wrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/gpu/gpu_type_converters.cc ('k') | mojo/edk/embedder/platform_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "mojo/edk/embedder/embedder_internal.h" 7 #include "mojo/edk/embedder/embedder_internal.h"
8 #include "mojo/edk/system/core.h" 8 #include "mojo/edk/system/core.h"
9 #include "mojo/public/c/system/buffer.h" 9 #include "mojo/public/c/system/buffer.h"
10 #include "mojo/public/c/system/data_pipe.h" 10 #include "mojo/public/c/system/data_pipe.h"
11 #include "mojo/public/c/system/functions.h" 11 #include "mojo/public/c/system/functions.h"
12 #include "mojo/public/c/system/message_pipe.h" 12 #include "mojo/public/c/system/message_pipe.h"
13 #include "mojo/public/c/system/platform_handle.h"
13 #include "mojo/public/c/system/wait_set.h" 14 #include "mojo/public/c/system/wait_set.h"
14 15
15 using mojo::edk::internal::g_core; 16 using mojo::edk::internal::g_core;
16 17
17 // Definitions of the system functions. 18 // Definitions of the system functions.
18 extern "C" { 19 extern "C" {
19 20
20 MojoTimeTicks MojoGetTimeTicksNow() { 21 MojoTimeTicks MojoGetTimeTicksNow() {
21 return g_core->GetTimeTicksNow(); 22 return g_core->GetTimeTicksNow();
22 } 23 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 uint64_t num_bytes, 209 uint64_t num_bytes,
209 void** buffer, 210 void** buffer,
210 MojoMapBufferFlags flags) { 211 MojoMapBufferFlags flags) {
211 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags); 212 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags);
212 } 213 }
213 214
214 MojoResult MojoUnmapBuffer(void* buffer) { 215 MojoResult MojoUnmapBuffer(void* buffer) {
215 return g_core->UnmapBuffer(buffer); 216 return g_core->UnmapBuffer(buffer);
216 } 217 }
217 218
219 MojoResult MojoWrapPlatformHandle(const MojoPlatformHandle* platform_handle,
220 MojoHandle* mojo_handle) {
221 return g_core->WrapPlatformHandle(platform_handle, mojo_handle);
222 }
223
224 MojoResult MojoUnwrapPlatformHandle(MojoHandle mojo_handle,
225 MojoPlatformHandle* platform_handle) {
226 return g_core->UnwrapPlatformHandle(mojo_handle, platform_handle);
227 }
228
229 MojoResult MojoWrapPlatformSharedBufferHandle(
230 const MojoPlatformHandle* platform_handle,
231 size_t num_bytes,
232 MojoPlatformSharedBufferHandleFlags flags,
233 MojoHandle* mojo_handle) {
234 return g_core->WrapPlatformSharedBufferHandle(platform_handle, num_bytes,
235 flags, mojo_handle);
236 }
237
238 MojoResult MojoUnwrapPlatformSharedBufferHandle(
239 MojoHandle mojo_handle,
240 MojoPlatformHandle* platform_handle,
241 size_t* num_bytes,
242 MojoPlatformSharedBufferHandleFlags* flags) {
243 return g_core->UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle,
244 num_bytes, flags);
245 }
246
218 } // extern "C" 247 } // extern "C"
OLDNEW
« no previous file with comments | « components/mus/gpu/gpu_type_converters.cc ('k') | mojo/edk/embedder/platform_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698