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

Unified Diff: mojo/edk/system/core.h

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/edk/system/BUILD.gn ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.h
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index 7871480e72c158a16763a21fd0ed6a2a491a778a..5e061f1ebc58eeb637cd43f14afcec70543cfab7 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -24,6 +24,7 @@
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
#include "mojo/public/c/system/message_pipe.h"
+#include "mojo/public/c/system/platform_handle.h"
#include "mojo/public/c/system/types.h"
#include "mojo/public/cpp/system/message_pipe.h"
@@ -239,6 +240,23 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
MojoMapBufferFlags flags);
MojoResult UnmapBuffer(void* buffer);
+ // These methods correspond to the API functions defined in
+ // "mojo/public/c/system/platform_handle.h".
+ MojoResult WrapPlatformHandle(const MojoPlatformHandle* platform_handle,
+ MojoHandle* mojo_handle);
+ MojoResult UnwrapPlatformHandle(MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle);
+ MojoResult WrapPlatformSharedBufferHandle(
+ const MojoPlatformHandle* platform_handle,
+ size_t size,
+ MojoPlatformSharedBufferHandleFlags flags,
+ MojoHandle* mojo_handle);
+ MojoResult UnwrapPlatformSharedBufferHandle(
+ MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle,
+ size_t* size,
+ MojoPlatformSharedBufferHandleFlags* flags);
+
void GetActiveHandlesForTest(std::vector<MojoHandle>* handles);
private:
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698