| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const Instance& stack_trace); | 122 const Instance& stack_trace); |
| 123 | 123 |
| 124 static void PostError(const String& method_name, | 124 static void PostError(const String& method_name, |
| 125 const Array& parameter_keys, | 125 const Array& parameter_keys, |
| 126 const Array& parameter_values, | 126 const Array& parameter_values, |
| 127 const Instance& reply_port, | 127 const Instance& reply_port, |
| 128 const Instance& id, | 128 const Instance& id, |
| 129 const Error& error); | 129 const Error& error); |
| 130 | 130 |
| 131 // Well-known streams. | 131 // Well-known streams. |
| 132 static StreamInfo vm_stream; |
| 132 static StreamInfo isolate_stream; | 133 static StreamInfo isolate_stream; |
| 133 static StreamInfo debug_stream; | 134 static StreamInfo debug_stream; |
| 134 static StreamInfo gc_stream; | 135 static StreamInfo gc_stream; |
| 135 static StreamInfo echo_stream; | 136 static StreamInfo echo_stream; |
| 136 static StreamInfo graph_stream; | 137 static StreamInfo graph_stream; |
| 137 static StreamInfo logging_stream; | 138 static StreamInfo logging_stream; |
| 138 | 139 |
| 139 static bool ListenStream(const char* stream_id); | 140 static bool ListenStream(const char* stream_id); |
| 140 static void CancelStream(const char* stream_id); | 141 static void CancelStream(const char* stream_id); |
| 141 | 142 |
| 142 static Dart_ServiceStreamListenCallback stream_listen_callback() { | 143 static Dart_ServiceStreamListenCallback stream_listen_callback() { |
| 143 return stream_listen_callback_; | 144 return stream_listen_callback_; |
| 144 } | 145 } |
| 145 static Dart_ServiceStreamCancelCallback stream_cancel_callback() { | 146 static Dart_ServiceStreamCancelCallback stream_cancel_callback() { |
| 146 return stream_cancel_callback_; | 147 return stream_cancel_callback_; |
| 147 } | 148 } |
| 148 | 149 |
| 150 static void PrintJSONForVM(JSONStream* js, bool ref); |
| 151 |
| 149 private: | 152 private: |
| 150 static void InvokeMethod(Isolate* isolate, const Array& message); | 153 static void InvokeMethod(Isolate* isolate, const Array& message); |
| 151 | 154 |
| 152 static void EmbedderHandleMessage(EmbedderServiceHandler* handler, | 155 static void EmbedderHandleMessage(EmbedderServiceHandler* handler, |
| 153 JSONStream* js); | 156 JSONStream* js); |
| 154 | 157 |
| 155 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name); | 158 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name); |
| 156 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name); | 159 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name); |
| 157 static void ScheduleExtensionHandler(const Instance& handler, | 160 static void ScheduleExtensionHandler(const Instance& handler, |
| 158 const String& method_name, | 161 const String& method_name, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 183 static bool needs_isolate_events_; | 186 static bool needs_isolate_events_; |
| 184 static bool needs_debug_events_; | 187 static bool needs_debug_events_; |
| 185 static bool needs_gc_events_; | 188 static bool needs_gc_events_; |
| 186 static bool needs_echo_events_; | 189 static bool needs_echo_events_; |
| 187 static bool needs_graph_events_; | 190 static bool needs_graph_events_; |
| 188 }; | 191 }; |
| 189 | 192 |
| 190 } // namespace dart | 193 } // namespace dart |
| 191 | 194 |
| 192 #endif // VM_SERVICE_H_ | 195 #endif // VM_SERVICE_H_ |
| OLD | NEW |