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

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

Issue 1876353006: Add Mojo{Set,Get}DataPipeProducerOptions() to the NaCl system thunks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gah 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 | « mojo/public/platform/native/system_impl_private_thunks.h ('k') | no next file » | 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 "mojo/public/platform/native/system_impl_private_thunks.h" 5 #include "mojo/public/platform/native/system_impl_private_thunks.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 8
9 #include "mojo/public/platform/native/thunk_export.h" 9 #include "mojo/public/platform/native/thunk_export.h"
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 MojoResult MojoSystemImplCreateDataPipe( 103 MojoResult MojoSystemImplCreateDataPipe(
104 MojoSystemImpl system, 104 MojoSystemImpl system,
105 const struct MojoCreateDataPipeOptions* options, 105 const struct MojoCreateDataPipeOptions* options,
106 MojoHandle* data_pipe_producer_handle, 106 MojoHandle* data_pipe_producer_handle,
107 MojoHandle* data_pipe_consumer_handle) { 107 MojoHandle* data_pipe_consumer_handle) {
108 assert(g_system_impl_thunks.CreateDataPipe); 108 assert(g_system_impl_thunks.CreateDataPipe);
109 return g_system_impl_thunks.CreateDataPipe( 109 return g_system_impl_thunks.CreateDataPipe(
110 system, options, data_pipe_producer_handle, data_pipe_consumer_handle); 110 system, options, data_pipe_producer_handle, data_pipe_consumer_handle);
111 } 111 }
112 112
113 MojoResult MojoSystemImplSetDataPipeProducerOptions(
114 MojoSystemImpl system,
115 MojoHandle data_pipe_producer_handle,
116 const struct MojoDataPipeProducerOptions* options) {
117 assert(g_system_impl_thunks.SetDataPipeProducerOptions);
118 return g_system_impl_thunks.SetDataPipeProducerOptions(
119 system, data_pipe_producer_handle, options);
120 }
121
122 MojoResult MojoSystemImplGetDataPipeProducerOptions(
123 MojoSystemImpl system,
124 MojoHandle data_pipe_producer_handle,
125 struct MojoDataPipeProducerOptions* options,
126 uint32_t options_num_bytes) {
127 assert(g_system_impl_thunks.GetDataPipeProducerOptions);
128 return g_system_impl_thunks.GetDataPipeProducerOptions(
129 system, data_pipe_producer_handle, options, options_num_bytes);
130 }
131
113 MojoResult MojoSystemImplWriteData(MojoSystemImpl system, 132 MojoResult MojoSystemImplWriteData(MojoSystemImpl system,
114 MojoHandle data_pipe_producer_handle, 133 MojoHandle data_pipe_producer_handle,
115 const void* elements, 134 const void* elements,
116 uint32_t* num_elements, 135 uint32_t* num_elements,
117 MojoWriteDataFlags flags) { 136 MojoWriteDataFlags flags) {
118 assert(g_system_impl_thunks.WriteData); 137 assert(g_system_impl_thunks.WriteData);
119 return g_system_impl_thunks.WriteData(system, data_pipe_producer_handle, 138 return g_system_impl_thunks.WriteData(system, data_pipe_producer_handle,
120 elements, num_elements, flags); 139 elements, num_elements, flags);
121 } 140 }
122 141
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 g_system_impl_control_thunks = *system_thunks; 256 g_system_impl_control_thunks = *system_thunks;
238 return sizeof(g_system_impl_control_thunks); 257 return sizeof(g_system_impl_control_thunks);
239 } 258 }
240 259
241 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate( 260 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate(
242 const struct MojoSystemImplThunksPrivate* system_thunks) { 261 const struct MojoSystemImplThunksPrivate* system_thunks) {
243 if (system_thunks->size >= sizeof(g_system_impl_thunks)) 262 if (system_thunks->size >= sizeof(g_system_impl_thunks))
244 g_system_impl_thunks = *system_thunks; 263 g_system_impl_thunks = *system_thunks;
245 return sizeof(g_system_impl_thunks); 264 return sizeof(g_system_impl_thunks);
246 } 265 }
OLDNEW
« no previous file with comments | « mojo/public/platform/native/system_impl_private_thunks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698