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

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

Issue 2056513002: Plumb MojoReplaceHandleWithReducedRights() out. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_replace_reduce_1
Patch Set: Created 4 years, 6 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 (*ReplaceHandleWithReducedRights)(
41 MojoSystemImpl system,
42 MojoHandle handle,
43 MojoHandleRights rights_to_remove,
44 MojoHandle* replacement_handle);
40 MojoResult (*DuplicateHandleWithReducedRights)( 45 MojoResult (*DuplicateHandleWithReducedRights)(
41 MojoSystemImpl system, 46 MojoSystemImpl system,
42 MojoHandle handle, 47 MojoHandle handle,
43 MojoHandleRights rights_to_remove, 48 MojoHandleRights rights_to_remove,
44 MojoHandle* new_handle); 49 MojoHandle* new_handle);
45 MojoResult (*DuplicateHandle)(MojoSystemImpl system, 50 MojoResult (*DuplicateHandle)(MojoSystemImpl system,
46 MojoHandle handle, 51 MojoHandle handle,
47 MojoHandle* new_handle); 52 MojoHandle* new_handle);
48 MojoResult (*Wait)(MojoSystemImpl system, 53 MojoResult (*Wait)(MojoSystemImpl system,
49 MojoHandle handle, 54 MojoHandle handle,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 MojoSystemImplTransferHandle}; 163 MojoSystemImplTransferHandle};
159 return system_thunks; 164 return system_thunks;
160 } 165 }
161 166
162 inline MojoSystemImplThunksPrivate MojoMakeSystemImplThunksPrivate() { 167 inline MojoSystemImplThunksPrivate MojoMakeSystemImplThunksPrivate() {
163 MojoSystemImplThunksPrivate system_thunks = { 168 MojoSystemImplThunksPrivate system_thunks = {
164 sizeof(MojoSystemImplThunksPrivate), 169 sizeof(MojoSystemImplThunksPrivate),
165 MojoSystemImplGetTimeTicksNow, 170 MojoSystemImplGetTimeTicksNow,
166 MojoSystemImplClose, 171 MojoSystemImplClose,
167 MojoSystemImplGetRights, 172 MojoSystemImplGetRights,
173 MojoSystemImplReplaceHandleWithReducedRights,
168 MojoSystemImplDuplicateHandleWithReducedRights, 174 MojoSystemImplDuplicateHandleWithReducedRights,
169 MojoSystemImplDuplicateHandle, 175 MojoSystemImplDuplicateHandle,
170 MojoSystemImplWait, 176 MojoSystemImplWait,
171 MojoSystemImplWaitMany, 177 MojoSystemImplWaitMany,
172 MojoSystemImplCreateMessagePipe, 178 MojoSystemImplCreateMessagePipe,
173 MojoSystemImplWriteMessage, 179 MojoSystemImplWriteMessage,
174 MojoSystemImplReadMessage, 180 MojoSystemImplReadMessage,
175 MojoSystemImplCreateDataPipe, 181 MojoSystemImplCreateDataPipe,
176 MojoSystemImplSetDataPipeProducerOptions, 182 MojoSystemImplSetDataPipeProducerOptions,
177 MojoSystemImplGetDataPipeProducerOptions, 183 MojoSystemImplGetDataPipeProducerOptions,
178 MojoSystemImplWriteData, 184 MojoSystemImplWriteData,
179 MojoSystemImplBeginWriteData, 185 MojoSystemImplBeginWriteData,
180 MojoSystemImplEndWriteData, 186 MojoSystemImplEndWriteData,
181 MojoSystemImplSetDataPipeConsumerOptions, 187 MojoSystemImplSetDataPipeConsumerOptions,
182 MojoSystemImplGetDataPipeConsumerOptions, 188 MojoSystemImplGetDataPipeConsumerOptions,
183 MojoSystemImplReadData, 189 MojoSystemImplReadData,
184 MojoSystemImplBeginReadData, 190 MojoSystemImplBeginReadData,
185 MojoSystemImplEndReadData, 191 MojoSystemImplEndReadData,
186 MojoSystemImplCreateSharedBuffer, 192 MojoSystemImplCreateSharedBuffer,
187 MojoSystemImplDuplicateBufferHandle, 193 MojoSystemImplDuplicateBufferHandle,
188 MojoSystemImplGetBufferInformation, 194 MojoSystemImplGetBufferInformation,
189 MojoSystemImplMapBuffer, 195 MojoSystemImplMapBuffer,
190 MojoSystemImplUnmapBuffer}; 196 MojoSystemImplUnmapBuffer};
191 return system_thunks; 197 return system_thunks;
192 } 198 }
193 #endif 199 #endif
194 200
195 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_ 201 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_IMPL_PRIVATE_THUNKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698