OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/c/system/thunks.h" | 5 #include "mojo/public/c/system/thunks.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 num_bytes, flags); | 275 num_bytes, flags); |
276 } | 276 } |
277 | 277 |
278 MojoResult MojoNotifyBadMessage(MojoMessageHandle message, | 278 MojoResult MojoNotifyBadMessage(MojoMessageHandle message, |
279 const char* error, | 279 const char* error, |
280 size_t error_num_bytes) { | 280 size_t error_num_bytes) { |
281 assert(g_thunks.NotifyBadMessage); | 281 assert(g_thunks.NotifyBadMessage); |
282 return g_thunks.NotifyBadMessage(message, error, error_num_bytes); | 282 return g_thunks.NotifyBadMessage(message, error, error_num_bytes); |
283 } | 283 } |
284 | 284 |
| 285 MojoResult MojoGetProperty(MojoPropertyType type, void* value) { |
| 286 assert(g_thunks.GetProperty); |
| 287 return g_thunks.GetProperty(type, value); |
| 288 } |
| 289 |
285 } // extern "C" | 290 } // extern "C" |
286 | 291 |
287 size_t MojoEmbedderSetSystemThunks(const MojoSystemThunks* system_thunks) { | 292 size_t MojoEmbedderSetSystemThunks(const MojoSystemThunks* system_thunks) { |
288 if (system_thunks->size >= sizeof(g_thunks)) | 293 if (system_thunks->size >= sizeof(g_thunks)) |
289 g_thunks = *system_thunks; | 294 g_thunks = *system_thunks; |
290 return sizeof(g_thunks); | 295 return sizeof(g_thunks); |
291 } | 296 } |
OLD | NEW |