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

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

Issue 2000253002: Add thunks for MojoDuplicateHandle[WithReducedRights](). (Closed) Base URL: https://github.com/domokit/mojo.git@work792_dup_handle_1
Patch Set: 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_IMPL_PRIVATE_THUNKS_H_ 7 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_
8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_ 8 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_
9 9
10 #include "mojo/public/c/system/buffer.h" 10 #include "mojo/public/c/system/buffer.h"
(...skipping 19 matching lines...) Expand all
30 MojoHandle* result_handle); 30 MojoHandle* result_handle);
31 }; 31 };
32 32
33 struct MojoSystemImplThunksPrivate { 33 struct MojoSystemImplThunksPrivate {
34 size_t size; // Should be set to sizeof(MojoExplicitThunksPrivate). 34 size_t size; // Should be set to sizeof(MojoExplicitThunksPrivate).
35 MojoTimeTicks (*GetTimeTicksNow)(MojoSystemImpl system); 35 MojoTimeTicks (*GetTimeTicksNow)(MojoSystemImpl system);
36 MojoResult (*Close)(MojoSystemImpl system, MojoHandle handle); 36 MojoResult (*Close)(MojoSystemImpl system, MojoHandle handle);
37 MojoResult (*GetRights)(MojoSystemImpl system, 37 MojoResult (*GetRights)(MojoSystemImpl system,
38 MojoHandle handle, 38 MojoHandle handle,
39 MojoHandleRights* rights); 39 MojoHandleRights* rights);
40 MojoResult (*DuplicateHandleWithReducedRights)(
41 MojoSystemImpl system,
42 MojoHandle handle,
43 MojoHandleRights rights_to_remove,
44 MojoHandle* new_handle);
45 MojoResult (*DuplicateHandle)(MojoSystemImpl system,
46 MojoHandle handle,
47 MojoHandle* new_handle);
40 MojoResult (*Wait)(MojoSystemImpl system, 48 MojoResult (*Wait)(MojoSystemImpl system,
41 MojoHandle handle, 49 MojoHandle handle,
42 MojoHandleSignals signals, 50 MojoHandleSignals signals,
43 MojoDeadline deadline, 51 MojoDeadline deadline,
44 struct MojoHandleSignalsState* signals_state); 52 struct MojoHandleSignalsState* signals_state);
45 MojoResult (*WaitMany)(MojoSystemImpl system, 53 MojoResult (*WaitMany)(MojoSystemImpl system,
46 const MojoHandle* handles, 54 const MojoHandle* handles,
47 const MojoHandleSignals* signals, 55 const MojoHandleSignals* signals,
48 uint32_t num_handles, 56 uint32_t num_handles,
49 MojoDeadline deadline, 57 MojoDeadline deadline,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 MojoSystemImplTransferHandle}; 158 MojoSystemImplTransferHandle};
151 return system_thunks; 159 return system_thunks;
152 } 160 }
153 161
154 inline MojoSystemImplThunksPrivate MojoMakeSystemImplThunksPrivate() { 162 inline MojoSystemImplThunksPrivate MojoMakeSystemImplThunksPrivate() {
155 MojoSystemImplThunksPrivate system_thunks = { 163 MojoSystemImplThunksPrivate system_thunks = {
156 sizeof(MojoSystemImplThunksPrivate), 164 sizeof(MojoSystemImplThunksPrivate),
157 MojoSystemImplGetTimeTicksNow, 165 MojoSystemImplGetTimeTicksNow,
158 MojoSystemImplClose, 166 MojoSystemImplClose,
159 MojoSystemImplGetRights, 167 MojoSystemImplGetRights,
168 MojoSystemImplDuplicateHandleWithReducedRights,
169 MojoSystemImplDuplicateHandle,
160 MojoSystemImplWait, 170 MojoSystemImplWait,
161 MojoSystemImplWaitMany, 171 MojoSystemImplWaitMany,
162 MojoSystemImplCreateMessagePipe, 172 MojoSystemImplCreateMessagePipe,
163 MojoSystemImplWriteMessage, 173 MojoSystemImplWriteMessage,
164 MojoSystemImplReadMessage, 174 MojoSystemImplReadMessage,
165 MojoSystemImplCreateDataPipe, 175 MojoSystemImplCreateDataPipe,
166 MojoSystemImplSetDataPipeProducerOptions, 176 MojoSystemImplSetDataPipeProducerOptions,
167 MojoSystemImplGetDataPipeProducerOptions, 177 MojoSystemImplGetDataPipeProducerOptions,
168 MojoSystemImplWriteData, 178 MojoSystemImplWriteData,
169 MojoSystemImplBeginWriteData, 179 MojoSystemImplBeginWriteData,
170 MojoSystemImplEndWriteData, 180 MojoSystemImplEndWriteData,
171 MojoSystemImplSetDataPipeConsumerOptions, 181 MojoSystemImplSetDataPipeConsumerOptions,
172 MojoSystemImplGetDataPipeConsumerOptions, 182 MojoSystemImplGetDataPipeConsumerOptions,
173 MojoSystemImplReadData, 183 MojoSystemImplReadData,
174 MojoSystemImplBeginReadData, 184 MojoSystemImplBeginReadData,
175 MojoSystemImplEndReadData, 185 MojoSystemImplEndReadData,
176 MojoSystemImplCreateSharedBuffer, 186 MojoSystemImplCreateSharedBuffer,
177 MojoSystemImplDuplicateBufferHandle, 187 MojoSystemImplDuplicateBufferHandle,
178 MojoSystemImplGetBufferInformation, 188 MojoSystemImplGetBufferInformation,
179 MojoSystemImplMapBuffer, 189 MojoSystemImplMapBuffer,
180 MojoSystemImplUnmapBuffer}; 190 MojoSystemImplUnmapBuffer};
181 return system_thunks; 191 return system_thunks;
182 } 192 }
183 #endif 193 #endif
184 194
185 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_ 195 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_
OLDNEW
« no previous file with comments | « mojo/public/platform/native/system_impl_private.h ('k') | mojo/public/platform/native/system_impl_private_thunks.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698