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

Unified Diff: mojo/public/cpp/system/platform_handle.h

Issue 2537423004: mus: Add support for sending IOSurface mach_ports over mojo. (Closed)
Patch Set: . Created 4 years 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 | « no previous file | mojo/public/cpp/system/platform_handle.cc » ('j') | mojo/public/cpp/system/platform_handle.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/platform_handle.h
diff --git a/mojo/public/cpp/system/platform_handle.h b/mojo/public/cpp/system/platform_handle.h
index 4e33f1b1baf3e0a321feb3ba969191ea95898fd8..801264efce650c69d39f798b4f4b37cd5f08e296 100644
--- a/mojo/public/cpp/system/platform_handle.h
+++ b/mojo/public/cpp/system/platform_handle.h
@@ -76,6 +76,17 @@ UnwrapSharedMemoryHandle(ScopedSharedBufferHandle handle,
size_t* size,
bool* read_only);
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+// Wraps a mach_port_t as a Mojo handle. This takes a reference to the
+// Mach port.
+MOJO_CPP_SYSTEM_EXPORT ScopedHandle WrapMachPort(mach_port_t port);
+
+// Unwraps a mach_port_t from a Mojo handle. The caller gets ownership of the
+// Mach port.
+MOJO_CPP_SYSTEM_EXPORT MojoResult UnwrapMachPort(ScopedHandle handle,
+ mach_port_t* port);
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_SYSTEM_PLATFORM_HANDLE_H_
« no previous file with comments | « no previous file | mojo/public/cpp/system/platform_handle.cc » ('j') | mojo/public/cpp/system/platform_handle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698