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

Side by Side Diff: mojo/edk/embedder/system_impl_private_entrypoints.cc

Issue 1859123003: Add Mojo{Set,Get}DataPipeConsumerOptions() to the NaCl system thunks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | mojo/nacl/nonsfi/irt_mojo_nonsfi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "mojo/edk/embedder/embedder_internal.h" 6 #include "mojo/edk/embedder/embedder_internal.h"
7 #include "mojo/edk/system/core.h" 7 #include "mojo/edk/system/core.h"
8 #include "mojo/edk/system/dispatcher.h" 8 #include "mojo/edk/system/dispatcher.h"
9 #include "mojo/edk/util/ref_ptr.h" 9 #include "mojo/edk/util/ref_ptr.h"
10 #include "mojo/public/c/system/buffer.h" 10 #include "mojo/public/c/system/buffer.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 MojoResult MojoSystemImplEndWriteData(MojoSystemImpl system, 188 MojoResult MojoSystemImplEndWriteData(MojoSystemImpl system,
189 MojoHandle data_pipe_producer_handle, 189 MojoHandle data_pipe_producer_handle,
190 uint32_t num_elements_written) { 190 uint32_t num_elements_written) {
191 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); 191 mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
192 DCHECK(core); 192 DCHECK(core);
193 return core->EndWriteData(data_pipe_producer_handle, num_elements_written); 193 return core->EndWriteData(data_pipe_producer_handle, num_elements_written);
194 } 194 }
195 195
196 MojoResult MojoSystemImplSetDataPipeConsumerOptions(
197 MojoSystemImpl system,
198 MojoHandle data_pipe_consumer_handle,
199 const struct MojoDataPipeConsumerOptions* options) {
200 mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
201 DCHECK(core);
202 return core->SetDataPipeConsumerOptions(data_pipe_consumer_handle,
203 MakeUserPointer(options));
204 }
205
206 MojoResult MojoSystemImplGetDataPipeConsumerOptions(
207 MojoSystemImpl system,
208 MojoHandle data_pipe_consumer_handle,
209 struct MojoDataPipeConsumerOptions* options,
210 uint32_t options_num_bytes) {
211 mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
212 DCHECK(core);
213 return core->GetDataPipeConsumerOptions(
214 data_pipe_consumer_handle, MakeUserPointer(options), options_num_bytes);
215 }
216
196 MojoResult MojoSystemImplReadData(MojoSystemImpl system, 217 MojoResult MojoSystemImplReadData(MojoSystemImpl system,
197 MojoHandle data_pipe_consumer_handle, 218 MojoHandle data_pipe_consumer_handle,
198 void* elements, 219 void* elements,
199 uint32_t* num_elements, 220 uint32_t* num_elements,
200 MojoReadDataFlags flags) { 221 MojoReadDataFlags flags) {
201 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); 222 mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
202 DCHECK(core); 223 DCHECK(core);
203 return core->ReadData(data_pipe_consumer_handle, MakeUserPointer(elements), 224 return core->ReadData(data_pipe_consumer_handle, MakeUserPointer(elements),
204 MakeUserPointer(num_elements), flags); 225 MakeUserPointer(num_elements), flags);
205 } 226 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 MakeUserPointer(buffer), flags); 288 MakeUserPointer(buffer), flags);
268 } 289 }
269 290
270 MojoResult MojoSystemImplUnmapBuffer(MojoSystemImpl system, void* buffer) { 291 MojoResult MojoSystemImplUnmapBuffer(MojoSystemImpl system, void* buffer) {
271 mojo::system::Core* core = static_cast<mojo::system::Core*>(system); 292 mojo::system::Core* core = static_cast<mojo::system::Core*>(system);
272 DCHECK(core); 293 DCHECK(core);
273 return core->UnmapBuffer(MakeUserPointer(buffer)); 294 return core->UnmapBuffer(MakeUserPointer(buffer));
274 } 295 }
275 296
276 } // extern "C" 297 } // extern "C"
OLDNEW
« no previous file with comments | « no previous file | mojo/nacl/nonsfi/irt_mojo_nonsfi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698