| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdio.h> | 5 #include <stdio.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "dart/runtime/include/dart_api.h" | 11 #include "dart/runtime/include/dart_api.h" |
| 12 #include "mojo/dart/embedder/builtin.h" | |
| 13 #include "mojo/public/c/system/core.h" | 12 #include "mojo/public/c/system/core.h" |
| 14 #include "mojo/public/cpp/environment/logging.h" | 13 #include "mojo/public/cpp/environment/logging.h" |
| 15 #include "mojo/public/cpp/system/core.h" | 14 #include "mojo/public/cpp/system/core.h" |
| 16 #include "mojo/public/cpp/system/macros.h" | 15 #include "mojo/public/cpp/system/macros.h" |
| 17 | 16 |
| 18 namespace mojo { | 17 namespace mojo { |
| 19 namespace dart { | 18 namespace dart { |
| 20 | 19 |
| 20 #define REGISTER_FUNCTION(name, count) \ |
| 21 { "" #name, name, count }, |
| 22 #define DECLARE_FUNCTION(name, count) \ |
| 23 extern void name(Dart_NativeArguments args); |
| 24 |
| 21 #define MOJO_NATIVE_LIST(V) \ | 25 #define MOJO_NATIVE_LIST(V) \ |
| 22 V(MojoSharedBuffer_Create, 2) \ | 26 V(MojoSharedBuffer_Create, 2) \ |
| 23 V(MojoSharedBuffer_Duplicate, 2) \ | 27 V(MojoSharedBuffer_Duplicate, 2) \ |
| 24 V(MojoSharedBuffer_Map, 5) \ | 28 V(MojoSharedBuffer_Map, 5) \ |
| 25 V(MojoSharedBuffer_Unmap, 1) \ | 29 V(MojoSharedBuffer_Unmap, 1) \ |
| 26 V(MojoDataPipe_Create, 3) \ | 30 V(MojoDataPipe_Create, 3) \ |
| 27 V(MojoDataPipe_WriteData, 4) \ | 31 V(MojoDataPipe_WriteData, 4) \ |
| 28 V(MojoDataPipe_BeginWriteData, 3) \ | 32 V(MojoDataPipe_BeginWriteData, 3) \ |
| 29 V(MojoDataPipe_EndWriteData, 2) \ | 33 V(MojoDataPipe_EndWriteData, 2) \ |
| 30 V(MojoDataPipe_ReadData, 4) \ | 34 V(MojoDataPipe_ReadData, 4) \ |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 mojo_control_handle = control_handle; | 893 mojo_control_handle = control_handle; |
| 890 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(MOJO_RESULT_OK)); | 894 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(MOJO_RESULT_OK)); |
| 891 } | 895 } |
| 892 | 896 |
| 893 void MojoHandleWatcher_GetControlHandle(Dart_NativeArguments arguments) { | 897 void MojoHandleWatcher_GetControlHandle(Dart_NativeArguments arguments) { |
| 894 Dart_SetIntegerReturnValue(arguments, mojo_control_handle); | 898 Dart_SetIntegerReturnValue(arguments, mojo_control_handle); |
| 895 } | 899 } |
| 896 | 900 |
| 897 } // namespace dart | 901 } // namespace dart |
| 898 } // namespace mojo | 902 } // namespace mojo |
| OLD | NEW |