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

Unified Diff: mojo/public/platform/native/system_thunks.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/platform/native/system_thunks.h ('k') | services/catalog/public/cpp/resource_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/platform/native/system_thunks.cc
diff --git a/mojo/public/platform/native/system_thunks.cc b/mojo/public/platform/native/system_thunks.cc
index 238ede3f7e173a76891964983a62120acb45f6a4..86447c1cdebf2fe3c9fe19d9a5c62860edf19e80 100644
--- a/mojo/public/platform/native/system_thunks.cc
+++ b/mojo/public/platform/native/system_thunks.cc
@@ -243,6 +243,40 @@ MojoResult MojoGetMessageBuffer(MojoMessageHandle message, void** buffer) {
return g_thunks.GetMessageBuffer(message, buffer);
}
+MojoResult MojoWrapPlatformHandle(
+ const struct MojoPlatformHandle* platform_handle,
+ MojoHandle* mojo_handle) {
+ assert(g_thunks.WrapPlatformHandle);
+ return g_thunks.WrapPlatformHandle(platform_handle, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformHandle(
+ MojoHandle mojo_handle,
+ struct MojoPlatformHandle* platform_handle) {
+ assert(g_thunks.UnwrapPlatformHandle);
+ return g_thunks.UnwrapPlatformHandle(mojo_handle, platform_handle);
+}
+
+MojoResult MojoWrapPlatformSharedBufferHandle(
+ const struct MojoPlatformHandle* platform_handle,
+ size_t num_bytes,
+ MojoPlatformSharedBufferHandleFlags flags,
+ MojoHandle* mojo_handle) {
+ assert(g_thunks.WrapPlatformSharedBufferHandle);
+ return g_thunks.WrapPlatformSharedBufferHandle(platform_handle, num_bytes,
+ flags, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformSharedBufferHandle(
+ MojoHandle mojo_handle,
+ struct MojoPlatformHandle* platform_handle,
+ size_t* num_bytes,
+ MojoPlatformSharedBufferHandleFlags* flags) {
+ assert(g_thunks.UnwrapPlatformSharedBufferHandle);
+ return g_thunks.UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle,
+ num_bytes, flags);
+}
+
extern "C" THUNK_EXPORT size_t MojoSetSystemThunks(
const MojoSystemThunks* system_thunks) {
if (system_thunks->size >= sizeof(g_thunks))
« no previous file with comments | « mojo/public/platform/native/system_thunks.h ('k') | services/catalog/public/cpp/resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698