| 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" |
| 11 #include "vm/os_thread.h" | 11 #include "vm/os_thread.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 class Array; | 15 class Array; |
| 16 class DebuggerEvent; | |
| 17 class EmbedderServiceHandler; | 16 class EmbedderServiceHandler; |
| 18 class GCEvent; | 17 class GCEvent; |
| 19 class Instance; | 18 class Instance; |
| 20 class Isolate; | 19 class Isolate; |
| 21 class JSONStream; | 20 class JSONStream; |
| 22 class Object; | 21 class Object; |
| 23 class RawInstance; | 22 class RawInstance; |
| 23 class ServiceEvent; |
| 24 class String; | 24 class String; |
| 25 | 25 |
| 26 class Service : public AllStatic { | 26 class Service : public AllStatic { |
| 27 public: | 27 public: |
| 28 // Handles a message which is not directed to an isolate. | 28 // Handles a message which is not directed to an isolate. |
| 29 static void HandleRootMessage(const Array& message); | 29 static void HandleRootMessage(const Array& message); |
| 30 | 30 |
| 31 // Handles a message which is directed to a particular isolate. | 31 // Handles a message which is directed to a particular isolate. |
| 32 static void HandleIsolateMessage(Isolate* isolate, const Array& message); | 32 static void HandleIsolateMessage(Isolate* isolate, const Array& message); |
| 33 | 33 |
| 34 static bool EventMaskHas(uint32_t mask); | 34 static bool EventMaskHas(uint32_t mask); |
| 35 static void SetEventMask(uint32_t mask); | 35 static void SetEventMask(uint32_t mask); |
| 36 static bool NeedsEvents(); |
| 36 static bool NeedsDebuggerEvents(); | 37 static bool NeedsDebuggerEvents(); |
| 37 static bool NeedsGCEvents(); | 38 static bool NeedsGCEvents(); |
| 38 | 39 |
| 39 static void HandleDebuggerEvent(DebuggerEvent* event); | 40 static void HandleEvent(ServiceEvent* event); |
| 40 static void HandleGCEvent(GCEvent* event); | 41 static void HandleGCEvent(GCEvent* event); |
| 41 | 42 |
| 42 static void RegisterIsolateEmbedderCallback( | 43 static void RegisterIsolateEmbedderCallback( |
| 43 const char* name, | 44 const char* name, |
| 44 Dart_ServiceRequestCallback callback, | 45 Dart_ServiceRequestCallback callback, |
| 45 void* user_data); | 46 void* user_data); |
| 46 | 47 |
| 47 static void RegisterRootEmbedderCallback( | 48 static void RegisterRootEmbedderCallback( |
| 48 const char* name, | 49 const char* name, |
| 49 Dart_ServiceRequestCallback callback, | 50 Dart_ServiceRequestCallback callback, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 76 | 77 |
| 77 static EmbedderServiceHandler* isolate_service_handler_head_; | 78 static EmbedderServiceHandler* isolate_service_handler_head_; |
| 78 static EmbedderServiceHandler* root_service_handler_head_; | 79 static EmbedderServiceHandler* root_service_handler_head_; |
| 79 | 80 |
| 80 static uint32_t event_mask_; | 81 static uint32_t event_mask_; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace dart | 84 } // namespace dart |
| 84 | 85 |
| 85 #endif // VM_SERVICE_H_ | 86 #endif // VM_SERVICE_H_ |
| OLD | NEW |