| 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 #ifndef VM_SERVICE_H_ | 5 #ifndef VM_SERVICE_H_ |
| 6 #define VM_SERVICE_H_ | 6 #define VM_SERVICE_H_ |
| 7 | 7 |
| 8 #include "include/dart_tools_api.h" | 8 #include "include/dart_tools_api.h" |
| 9 | 9 |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 static void RegisterRootEmbedderCallback( | 95 static void RegisterRootEmbedderCallback( |
| 96 const char* name, | 96 const char* name, |
| 97 Dart_ServiceRequestCallback callback, | 97 Dart_ServiceRequestCallback callback, |
| 98 void* user_data); | 98 void* user_data); |
| 99 | 99 |
| 100 static void SetEmbedderStreamCallbacks( | 100 static void SetEmbedderStreamCallbacks( |
| 101 Dart_ServiceStreamListenCallback listen_callback, | 101 Dart_ServiceStreamListenCallback listen_callback, |
| 102 Dart_ServiceStreamCancelCallback cancel_callback); | 102 Dart_ServiceStreamCancelCallback cancel_callback); |
| 103 | 103 |
| 104 static void SetGetServiceAssetsCallback( |
| 105 Dart_GetVMServiceAssetsArchive get_service_assets); |
| 106 |
| 104 static void SendEchoEvent(Isolate* isolate, const char* text); | 107 static void SendEchoEvent(Isolate* isolate, const char* text); |
| 105 static void SendGraphEvent(Isolate* isolate); | 108 static void SendGraphEvent(Isolate* isolate); |
| 106 static void SendInspectEvent(Isolate* isolate, const Object& inspectee); | 109 static void SendInspectEvent(Isolate* isolate, const Object& inspectee); |
| 107 | 110 |
| 108 static void SendEmbedderEvent(Isolate* isolate, | 111 static void SendEmbedderEvent(Isolate* isolate, |
| 109 const char* stream_id, | 112 const char* stream_id, |
| 110 const char* event_kind, | 113 const char* event_kind, |
| 111 const uint8_t* bytes, | 114 const uint8_t* bytes, |
| 112 intptr_t bytes_len); | 115 intptr_t bytes_len); |
| 113 | 116 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 133 static StreamInfo isolate_stream; | 136 static StreamInfo isolate_stream; |
| 134 static StreamInfo debug_stream; | 137 static StreamInfo debug_stream; |
| 135 static StreamInfo gc_stream; | 138 static StreamInfo gc_stream; |
| 136 static StreamInfo echo_stream; | 139 static StreamInfo echo_stream; |
| 137 static StreamInfo graph_stream; | 140 static StreamInfo graph_stream; |
| 138 static StreamInfo logging_stream; | 141 static StreamInfo logging_stream; |
| 139 | 142 |
| 140 static bool ListenStream(const char* stream_id); | 143 static bool ListenStream(const char* stream_id); |
| 141 static void CancelStream(const char* stream_id); | 144 static void CancelStream(const char* stream_id); |
| 142 | 145 |
| 146 static RawObject* RequestAssets(); |
| 147 |
| 143 static Dart_ServiceStreamListenCallback stream_listen_callback() { | 148 static Dart_ServiceStreamListenCallback stream_listen_callback() { |
| 144 return stream_listen_callback_; | 149 return stream_listen_callback_; |
| 145 } | 150 } |
| 146 static Dart_ServiceStreamCancelCallback stream_cancel_callback() { | 151 static Dart_ServiceStreamCancelCallback stream_cancel_callback() { |
| 147 return stream_cancel_callback_; | 152 return stream_cancel_callback_; |
| 148 } | 153 } |
| 149 | 154 |
| 150 static void PrintJSONForVM(JSONStream* js, bool ref); | 155 static void PrintJSONForVM(JSONStream* js, bool ref); |
| 151 | 156 |
| 152 private: | 157 private: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 175 intptr_t size); | 180 intptr_t size); |
| 176 | 181 |
| 177 static void PostEvent(const char* stream_id, | 182 static void PostEvent(const char* stream_id, |
| 178 const char* kind, | 183 const char* kind, |
| 179 JSONStream* event); | 184 JSONStream* event); |
| 180 | 185 |
| 181 static EmbedderServiceHandler* isolate_service_handler_head_; | 186 static EmbedderServiceHandler* isolate_service_handler_head_; |
| 182 static EmbedderServiceHandler* root_service_handler_head_; | 187 static EmbedderServiceHandler* root_service_handler_head_; |
| 183 static Dart_ServiceStreamListenCallback stream_listen_callback_; | 188 static Dart_ServiceStreamListenCallback stream_listen_callback_; |
| 184 static Dart_ServiceStreamCancelCallback stream_cancel_callback_; | 189 static Dart_ServiceStreamCancelCallback stream_cancel_callback_; |
| 190 static Dart_GetVMServiceAssetsArchive get_service_assets_callback_; |
| 185 | 191 |
| 186 static bool needs_isolate_events_; | 192 static bool needs_isolate_events_; |
| 187 static bool needs_debug_events_; | 193 static bool needs_debug_events_; |
| 188 static bool needs_gc_events_; | 194 static bool needs_gc_events_; |
| 189 static bool needs_echo_events_; | 195 static bool needs_echo_events_; |
| 190 static bool needs_graph_events_; | 196 static bool needs_graph_events_; |
| 191 }; | 197 }; |
| 192 | 198 |
| 193 } // namespace dart | 199 } // namespace dart |
| 194 | 200 |
| 195 #endif // VM_SERVICE_H_ | 201 #endif // VM_SERVICE_H_ |
| OLD | NEW |