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_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 Dart_ServiceRequestCallback callback, | 40 Dart_ServiceRequestCallback callback, |
41 void* user_data); | 41 void* user_data); |
42 | 42 |
43 static void RegisterRootEmbedderCallback( | 43 static void RegisterRootEmbedderCallback( |
44 const char* name, | 44 const char* name, |
45 Dart_ServiceRequestCallback callback, | 45 Dart_ServiceRequestCallback callback, |
46 void* user_data); | 46 void* user_data); |
47 | 47 |
48 static void SendEchoEvent(Isolate* isolate, const char* text); | 48 static void SendEchoEvent(Isolate* isolate, const char* text); |
49 static void SendGraphEvent(Isolate* isolate); | 49 static void SendGraphEvent(Isolate* isolate); |
| 50 static void SendInspectEvent(Isolate* isolate, const Object& inspectee); |
50 | 51 |
51 private: | 52 private: |
52 static void InvokeMethod(Isolate* isolate, const Array& message); | 53 static void InvokeMethod(Isolate* isolate, const Array& message); |
53 | 54 |
54 static void EmbedderHandleMessage(EmbedderServiceHandler* handler, | 55 static void EmbedderHandleMessage(EmbedderServiceHandler* handler, |
55 JSONStream* js); | 56 JSONStream* js); |
56 | 57 |
57 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name); | 58 static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name); |
58 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name); | 59 static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name); |
59 | 60 |
60 static void SendEvent(intptr_t eventType, | 61 static void SendEvent(intptr_t eventType, |
61 const Object& eventMessage); | 62 const Object& eventMessage); |
62 // Does not take ownership of 'data'. | 63 // Does not take ownership of 'data'. |
63 static void SendEvent(const String& meta, | 64 static void SendEvent(const String& meta, |
64 const uint8_t* data, | 65 const uint8_t* data, |
65 intptr_t size); | 66 intptr_t size); |
66 | 67 |
67 static EmbedderServiceHandler* isolate_service_handler_head_; | 68 static EmbedderServiceHandler* isolate_service_handler_head_; |
68 static EmbedderServiceHandler* root_service_handler_head_; | 69 static EmbedderServiceHandler* root_service_handler_head_; |
69 }; | 70 }; |
70 | 71 |
71 } // namespace dart | 72 } // namespace dart |
72 | 73 |
73 #endif // VM_SERVICE_H_ | 74 #endif // VM_SERVICE_H_ |
OLD | NEW |