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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This file provides a C++ wrapping around the Mojo C API for platform handles, 5 // This file provides a C++ wrapping around the Mojo C API for platform handles,
6 // replacing the prefix of "Mojo" with a "mojo" namespace. 6 // replacing the prefix of "Mojo" with a "mojo" namespace.
7 // 7 //
8 // Please see "mojo/public/c/system/platform_handle.h" for complete 8 // Please see "mojo/public/c/system/platform_handle.h" for complete
9 // documentation of the API. 9 // documentation of the API.
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 bool read_only); 69 bool read_only);
70 70
71 // Unwraps a base::SharedMemoryHandle from a Mojo handle. The caller assumes 71 // Unwraps a base::SharedMemoryHandle from a Mojo handle. The caller assumes
72 // responsibility for the lifetime of the SharedMemoryHandle. 72 // responsibility for the lifetime of the SharedMemoryHandle.
73 MOJO_CPP_SYSTEM_EXPORT MojoResult 73 MOJO_CPP_SYSTEM_EXPORT MojoResult
74 UnwrapSharedMemoryHandle(ScopedSharedBufferHandle handle, 74 UnwrapSharedMemoryHandle(ScopedSharedBufferHandle handle,
75 base::SharedMemoryHandle* memory_handle, 75 base::SharedMemoryHandle* memory_handle,
76 size_t* size, 76 size_t* size,
77 bool* read_only); 77 bool* read_only);
78 78
79 #if defined(OS_MACOSX) && !defined(OS_IOS)
80 // Wraps a mach_port_t as a Mojo handle. This takes a reference to the
81 // Mach port.
82 MOJO_CPP_SYSTEM_EXPORT ScopedHandle WrapMachPort(mach_port_t port);
83
84 // Unwraps a mach_port_t from a Mojo handle. The caller gets ownership of the
85 // Mach port.
86 MOJO_CPP_SYSTEM_EXPORT MojoResult UnwrapMachPort(ScopedHandle handle,
87 mach_port_t* port);
88 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
89
79 } // namespace mojo 90 } // namespace mojo
80 91
81 #endif // MOJO_PUBLIC_CPP_SYSTEM_PLATFORM_HANDLE_H_ 92 #endif // MOJO_PUBLIC_CPP_SYSTEM_PLATFORM_HANDLE_H_
OLDNEW
« 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