OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 102 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
103 CreateSharedBufferWrapper(base::SharedMemoryHandle shared_memory_handle, | 103 CreateSharedBufferWrapper(base::SharedMemoryHandle shared_memory_handle, |
104 size_t num_bytes, | 104 size_t num_bytes, |
105 bool read_only, | 105 bool read_only, |
106 MojoHandle* mojo_wrapper_handle); | 106 MojoHandle* mojo_wrapper_handle); |
107 | 107 |
108 // Retrieves the underlying |SharedMemoryHandle| from a shared buffer | 108 // Retrieves the underlying |SharedMemoryHandle| from a shared buffer |
109 // |MojoHandle| and closes the handle. If successful, |num_bytes| will contain | 109 // |MojoHandle| and closes the handle. If successful, |num_bytes| will contain |
110 // the size of the shared memory buffer and |read_only| will contain whether the | 110 // the size of the shared memory buffer and |read_only| will contain whether the |
111 // buffer handle is read-only. Both |num_bytes| and |read_only| may be null. | 111 // buffer handle is read-only. Both |num_bytes| and |read_only| may be null. |
112 // Note: The value of |shared_memory_handle| may be | 112 // Note: |shared_memory_handle| may be invalid even if this function returns |
113 // base::SharedMemory::NULLHandle(), even if this function returns success. | 113 // success. |
114 // Callers should perform appropriate checks. | 114 // Callers should perform appropriate checks. |
115 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 115 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
116 PassSharedMemoryHandle(MojoHandle mojo_handle, | 116 PassSharedMemoryHandle(MojoHandle mojo_handle, |
117 base::SharedMemoryHandle* shared_memory_handle, | 117 base::SharedMemoryHandle* shared_memory_handle, |
118 size_t* num_bytes, | 118 size_t* num_bytes, |
119 bool* read_only); | 119 bool* read_only); |
120 | 120 |
121 // Initialialization/shutdown for interprocess communication (IPC) ------------- | 121 // Initialialization/shutdown for interprocess communication (IPC) ------------- |
122 | 122 |
123 // |InitIPCSupport()| sets up the subsystem for interprocess communication, | 123 // |InitIPCSupport()| sets up the subsystem for interprocess communication, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // | 164 // |
165 // Default property values: | 165 // Default property values: |
166 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true | 166 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true |
167 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, | 167 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, |
168 const void* value); | 168 const void* value); |
169 | 169 |
170 } // namespace edk | 170 } // namespace edk |
171 } // namespace mojo | 171 } // namespace mojo |
172 | 172 |
173 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 173 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
OLD | NEW |