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 5913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5924 return; | 5924 return; |
5925 } | 5925 } |
5926 | 5926 |
5927 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5927 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
5928 const char* name, | 5928 const char* name, |
5929 Dart_ServiceRequestCallback callback, | 5929 Dart_ServiceRequestCallback callback, |
5930 void* user_data) { | 5930 void* user_data) { |
5931 return; | 5931 return; |
5932 } | 5932 } |
5933 | 5933 |
| 5934 DART_EXPORT void Dart_SetEmbedderInformationCallback( |
| 5935 Dart_EmbedderInformationCallback callback) { |
| 5936 return; |
| 5937 } |
| 5938 |
5934 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( | 5939 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( |
5935 Dart_ServiceStreamListenCallback listen_callback, | 5940 Dart_ServiceStreamListenCallback listen_callback, |
5936 Dart_ServiceStreamCancelCallback cancel_callback) { | 5941 Dart_ServiceStreamCancelCallback cancel_callback) { |
5937 return Api::Success(); | 5942 return Api::Success(); |
5938 } | 5943 } |
5939 | 5944 |
5940 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, | 5945 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id, |
5941 const char* event_kind, | 5946 const char* event_kind, |
5942 const uint8_t* bytes, | 5947 const uint8_t* bytes, |
5943 intptr_t bytes_length) { | 5948 intptr_t bytes_length) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5989 | 5994 |
5990 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5995 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
5991 const char* name, | 5996 const char* name, |
5992 Dart_ServiceRequestCallback callback, | 5997 Dart_ServiceRequestCallback callback, |
5993 void* user_data) { | 5998 void* user_data) { |
5994 if (FLAG_support_service) { | 5999 if (FLAG_support_service) { |
5995 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 6000 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
5996 } | 6001 } |
5997 } | 6002 } |
5998 | 6003 |
| 6004 DART_EXPORT void Dart_SetEmbedderInformationCallback( |
| 6005 Dart_EmbedderInformationCallback callback) { |
| 6006 if (FLAG_support_service) { |
| 6007 Service::SetEmbedderInformationCallback(callback); |
| 6008 } |
| 6009 } |
| 6010 |
5999 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( | 6011 DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks( |
6000 Dart_ServiceStreamListenCallback listen_callback, | 6012 Dart_ServiceStreamListenCallback listen_callback, |
6001 Dart_ServiceStreamCancelCallback cancel_callback) { | 6013 Dart_ServiceStreamCancelCallback cancel_callback) { |
6002 if (!FLAG_support_service) { | 6014 if (!FLAG_support_service) { |
6003 return Api::Success(); | 6015 return Api::Success(); |
6004 } | 6016 } |
6005 if (listen_callback != NULL) { | 6017 if (listen_callback != NULL) { |
6006 if (Service::stream_listen_callback() != NULL) { | 6018 if (Service::stream_listen_callback() != NULL) { |
6007 return Api::NewError( | 6019 return Api::NewError( |
6008 "%s permits only one listen callback to be registered, please " | 6020 "%s permits only one listen callback to be registered, please " |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6788 #endif | 6800 #endif |
6789 } | 6801 } |
6790 | 6802 |
6791 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6803 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6792 #ifndef PRODUCT | 6804 #ifndef PRODUCT |
6793 Profiler::DumpStackTrace(context); | 6805 Profiler::DumpStackTrace(context); |
6794 #endif | 6806 #endif |
6795 } | 6807 } |
6796 | 6808 |
6797 } // namespace dart | 6809 } // namespace dart |
OLD | NEW |