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

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: 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
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..82b6bdee3a161a59e89d64b834592587c4953708 100644
--- a/mojo/public/platform/native/system_thunks.cc
+++ b/mojo/public/platform/native/system_thunks.cc
@@ -243,6 +243,38 @@ MojoResult MojoGetMessageBuffer(MojoMessageHandle message, void** buffer) {
return g_thunks.GetMessageBuffer(message, buffer);
}
+MojoResult MojoWrapPlatformHandle(MojoPlatformHandle platform_handle,
+ MojoHandle* mojo_handle) {
+ assert(g_thunks.WrapPlatformHandle);
+ return g_thunks.WrapPlatformHandle(platform_handle, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformHandle(MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle) {
+ assert(g_thunks.UnwrapPlatformHandle);
+ return g_thunks.UnwrapPlatformHandle(mojo_handle, platform_handle);
+}
+
+MojoResult MojoWrapPlatformSharedBufferHandle(
+ MojoPlatformHandle platform_handle,
+ size_t num_bytes,
+ bool read_only,
+ MojoHandle* mojo_handle) {
+ assert(g_thunks.WrapPlatformSharedBufferHandle);
+ return g_thunks.WrapPlatformSharedBufferHandle(platform_handle, num_bytes,
+ read_only, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformSharedBufferHandle(
+ MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle,
+ size_t* num_bytes,
+ bool* read_only) {
+ assert(g_thunks.UnwrapPlatformSharedBufferHandle);
+ return g_thunks.UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle,
+ num_bytes, read_only);
+}
+
extern "C" THUNK_EXPORT size_t MojoSetSystemThunks(
const MojoSystemThunks* system_thunks) {
if (system_thunks->size >= sizeof(g_thunks))
« mojo/public/c/system/types.h ('K') | « mojo/public/platform/native/system_thunks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698