OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 5910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5921 return; | 5921 return; |
5922 } | 5922 } |
5923 | 5923 |
5924 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5924 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
5925 const char* name, | 5925 const char* name, |
5926 Dart_ServiceRequestCallback callback, | 5926 Dart_ServiceRequestCallback callback, |
5927 void* user_data) { | 5927 void* user_data) { |
5928 return; | 5928 return; |
5929 } | 5929 } |
5930 | 5930 |
| 5931 DART_EXPORT void Dart_SetEmbedderInformationCallback( |
| 5932 Dart_EmbedderInformationCalback calback) { |
| 5933 return; |
| 5934 } |
| 5935 |
5931 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( | 5936 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( |
5932 Dart_ServiceStreamListenCallback listen_callback, | 5937 Dart_ServiceStreamListenCallback listen_callback, |
5933 Dart_ServiceStreamCancelCallback cancel_callback) { | 5938 Dart_ServiceStreamCancelCallback cancel_callback) { |
5934 return Api::Success(); | 5939 return Api::Success(); |
5935 } | 5940 } |
5936 | 5941 |
5937 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, | 5942 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, |
5938 const char* event_kind, | 5943 const char* event_kind, |
5939 const uint8_t* bytes, | 5944 const uint8_t* bytes, |
5940 intptr_t bytes_length) { | 5945 intptr_t bytes_length) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5986 | 5991 |
5987 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5992 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
5988 const char* name, | 5993 const char* name, |
5989 Dart_ServiceRequestCallback callback, | 5994 Dart_ServiceRequestCallback callback, |
5990 void* user_data) { | 5995 void* user_data) { |
5991 if (FLAG_support_service) { | 5996 if (FLAG_support_service) { |
5992 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 5997 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
5993 } | 5998 } |
5994 } | 5999 } |
5995 | 6000 |
| 6001 DART_EXPORT void Dart_SetEmbedderInformationCallback( |
| 6002 Dart_EmbedderInformationCallback callback) { |
| 6003 if (FLAG_support_service) { |
| 6004 Service::SetEmbedderInformationCallback(callback); |
| 6005 } |
| 6006 } |
| 6007 |
5996 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( | 6008 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( |
5997 Dart_ServiceStreamListenCallback listen_callback, | 6009 Dart_ServiceStreamListenCallback listen_callback, |
5998 Dart_ServiceStreamCancelCallback cancel_callback) { | 6010 Dart_ServiceStreamCancelCallback cancel_callback) { |
5999 if (!FLAG_support_service) { | 6011 if (!FLAG_support_service) { |
6000 return Api::Success(); | 6012 return Api::Success(); |
6001 } | 6013 } |
6002 if (listen_callback != NULL) { | 6014 if (listen_callback != NULL) { |
6003 if (Service::stream_listen_callback() != NULL) { | 6015 if (Service::stream_listen_callback() != NULL) { |
6004 return Api::NewError( | 6016 return Api::NewError( |
6005 "%s permits only one listen callback to be registered, please " | 6017 "%s permits only one listen callback to be registered, please " |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6785 #endif | 6797 #endif |
6786 } | 6798 } |
6787 | 6799 |
6788 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6800 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6789 #ifndef PRODUCT | 6801 #ifndef PRODUCT |
6790 Profiler::DumpStackTrace(context); | 6802 Profiler::DumpStackTrace(context); |
6791 #endif | 6803 #endif |
6792 } | 6804 } |
6793 | 6805 |
6794 } // namespace dart | 6806 } // namespace dart |
OLD | NEW |