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

Side by Side Diff: mojo/public/platform/native/system_thunks.h

Issue 1993283002: Add thunks for MojoGetRights(), etc. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_core_get_rights
Patch Set: I'm an idiot 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 unified diff | Download patch
OLDNEW
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 // Note: This header should be compilable as C. 5 // Note: This header should be compilable as C.
6 6
7 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 7 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 MojoHandle data_pipe_consumer_handle, 119 MojoHandle data_pipe_consumer_handle,
120 struct MojoDataPipeConsumerOptions* options, 120 struct MojoDataPipeConsumerOptions* options,
121 uint32_t options_num_bytes); 121 uint32_t options_num_bytes);
122 MojoResult (*SetDataPipeProducerOptions)( 122 MojoResult (*SetDataPipeProducerOptions)(
123 MojoHandle data_pipe_producer_handle, 123 MojoHandle data_pipe_producer_handle,
124 const struct MojoDataPipeProducerOptions* options); 124 const struct MojoDataPipeProducerOptions* options);
125 MojoResult (*GetDataPipeProducerOptions)( 125 MojoResult (*GetDataPipeProducerOptions)(
126 MojoHandle data_pipe_producer_handle, 126 MojoHandle data_pipe_producer_handle,
127 struct MojoDataPipeProducerOptions* options, 127 struct MojoDataPipeProducerOptions* options,
128 uint32_t options_num_bytes); 128 uint32_t options_num_bytes);
129 MojoResult (*GetRights)(MojoHandle handle, MojoHandleRights* rights);
129 }; 130 };
130 #pragma pack(pop) 131 #pragma pack(pop)
131 132
132 133
133 #ifdef __cplusplus 134 #ifdef __cplusplus
134 // Intended to be called from the embedder. Returns a |MojoCore| initialized 135 // Intended to be called from the embedder. Returns a |MojoCore| initialized
135 // to contain pointers to each of the embedder's MojoCore functions. 136 // to contain pointers to each of the embedder's MojoCore functions.
136 inline MojoSystemThunks MojoMakeSystemThunks() { 137 inline MojoSystemThunks MojoMakeSystemThunks() {
137 MojoSystemThunks system_thunks = { 138 MojoSystemThunks system_thunks = {
138 sizeof(MojoSystemThunks), 139 sizeof(MojoSystemThunks),
(...skipping 13 matching lines...) Expand all
152 MojoEndReadData, 153 MojoEndReadData,
153 MojoCreateSharedBuffer, 154 MojoCreateSharedBuffer,
154 MojoDuplicateBufferHandle, 155 MojoDuplicateBufferHandle,
155 MojoMapBuffer, 156 MojoMapBuffer,
156 MojoUnmapBuffer, 157 MojoUnmapBuffer,
157 MojoGetBufferInformation, 158 MojoGetBufferInformation,
158 MojoSetDataPipeConsumerOptions, 159 MojoSetDataPipeConsumerOptions,
159 MojoGetDataPipeConsumerOptions, 160 MojoGetDataPipeConsumerOptions,
160 MojoSetDataPipeProducerOptions, 161 MojoSetDataPipeProducerOptions,
161 MojoGetDataPipeProducerOptions, 162 MojoGetDataPipeProducerOptions,
163 MojoGetRights,
162 }; 164 };
163 return system_thunks; 165 return system_thunks;
164 } 166 }
165 #endif 167 #endif
166 168
167 169
168 // Use this type for the function found by dynamically discovering it in 170 // Use this type for the function found by dynamically discovering it in
169 // a DSO linked with mojo_system. For example: 171 // a DSO linked with mojo_system. For example:
170 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = 172 // MojoSetSystemThunksFn mojo_set_system_thunks_fn =
171 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( 173 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer(
172 // "MojoSetSystemThunks")); 174 // "MojoSetSystemThunks"));
173 // The expected size of |system_thunks} is returned. 175 // The expected size of |system_thunks} is returned.
174 // The contents of |system_thunks| are copied. 176 // The contents of |system_thunks| are copied.
175 typedef size_t (*MojoSetSystemThunksFn)( 177 typedef size_t (*MojoSetSystemThunksFn)(
176 const struct MojoSystemThunks* system_thunks); 178 const struct MojoSystemThunks* system_thunks);
177 179
178 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ 180 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_
OLDNEW
« no previous file with comments | « mojo/public/platform/native/system_impl_private_unittest.cc ('k') | mojo/public/platform/native/system_thunks.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698