| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 RUNTIME_VM_SERVICE_EVENT_H_ | 5 #ifndef RUNTIME_VM_SERVICE_EVENT_H_ |
| 6 #define RUNTIME_VM_SERVICE_EVENT_H_ | 6 #define RUNTIME_VM_SERVICE_EVENT_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 kGC, | 49 kGC, |
| 50 | 50 |
| 51 kEmbedder, | 51 kEmbedder, |
| 52 | 52 |
| 53 kLogging, | 53 kLogging, |
| 54 | 54 |
| 55 kExtension, | 55 kExtension, |
| 56 | 56 |
| 57 kTimelineEvents, | 57 kTimelineEvents, |
| 58 | 58 |
| 59 kEditorObjectSelected, | |
| 60 | |
| 61 kIllegal, | 59 kIllegal, |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 struct LogRecord { | 62 struct LogRecord { |
| 65 int64_t sequence_number; | 63 int64_t sequence_number; |
| 66 int64_t timestamp; | 64 int64_t timestamp; |
| 67 intptr_t level; | 65 intptr_t level; |
| 68 const String* name; | 66 const String* name; |
| 69 const String* message; | 67 const String* message; |
| 70 const Instance* zone; | 68 const Instance* zone; |
| 71 const Object* error; | 69 const Object* error; |
| 72 const Instance* stack_trace; | 70 const Instance* stack_trace; |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 struct ExtensionEvent { | 73 struct ExtensionEvent { |
| 76 const String* event_kind; | 74 const String* event_kind; |
| 77 const String* event_data; | 75 const String* event_data; |
| 78 }; | 76 }; |
| 79 | 77 |
| 80 struct EditorEvent { | |
| 81 const char* editor; | |
| 82 const Object* object; | |
| 83 }; | |
| 84 | |
| 85 ServiceEvent(Isolate* isolate, EventKind event_kind); | 78 ServiceEvent(Isolate* isolate, EventKind event_kind); |
| 86 | 79 |
| 87 Isolate* isolate() const { return isolate_; } | 80 Isolate* isolate() const { return isolate_; } |
| 88 | 81 |
| 89 // Used by the C embedding api. | 82 // Used by the C embedding api. |
| 90 Dart_Port isolate_id() const { return isolate_->main_port(); } | 83 Dart_Port isolate_id() const { return isolate_->main_port(); } |
| 91 | 84 |
| 92 EventKind kind() const { return kind_; } | 85 EventKind kind() const { return kind_; } |
| 93 | 86 |
| 94 bool IsPause() const { | 87 bool IsPause() const { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 bytes_ = bytes; | 187 bytes_ = bytes; |
| 195 bytes_length_ = bytes_length; | 188 bytes_length_ = bytes_length; |
| 196 } | 189 } |
| 197 | 190 |
| 198 void set_log_record(const LogRecord& log_record) { log_record_ = log_record; } | 191 void set_log_record(const LogRecord& log_record) { log_record_ = log_record; } |
| 199 | 192 |
| 200 void set_extension_event(const ExtensionEvent& extension_event) { | 193 void set_extension_event(const ExtensionEvent& extension_event) { |
| 201 extension_event_ = extension_event; | 194 extension_event_ = extension_event; |
| 202 } | 195 } |
| 203 | 196 |
| 204 void set_editor_event(const EditorEvent& editor_event) { | |
| 205 editor_event_ = editor_event; | |
| 206 } | |
| 207 | |
| 208 void UpdateTimestamp(); | 197 void UpdateTimestamp(); |
| 209 | 198 |
| 210 int64_t timestamp() const { return timestamp_; } | 199 int64_t timestamp() const { return timestamp_; } |
| 211 | 200 |
| 212 const TimelineEventBlock* timeline_event_block() const { | 201 const TimelineEventBlock* timeline_event_block() const { |
| 213 return timeline_event_block_; | 202 return timeline_event_block_; |
| 214 } | 203 } |
| 215 | 204 |
| 216 void set_timeline_event_block(const TimelineEventBlock* block) { | 205 void set_timeline_event_block(const TimelineEventBlock* block) { |
| 217 ASSERT(kind() == kTimelineEvents); | 206 ASSERT(kind() == kTimelineEvents); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 235 const Error* reload_error_; | 224 const Error* reload_error_; |
| 236 const String* spawn_token_; | 225 const String* spawn_token_; |
| 237 const String* spawn_error_; | 226 const String* spawn_error_; |
| 238 bool at_async_jump_; | 227 bool at_async_jump_; |
| 239 const Object* inspectee_; | 228 const Object* inspectee_; |
| 240 const Heap::GCStats* gc_stats_; | 229 const Heap::GCStats* gc_stats_; |
| 241 const uint8_t* bytes_; | 230 const uint8_t* bytes_; |
| 242 intptr_t bytes_length_; | 231 intptr_t bytes_length_; |
| 243 LogRecord log_record_; | 232 LogRecord log_record_; |
| 244 ExtensionEvent extension_event_; | 233 ExtensionEvent extension_event_; |
| 245 EditorEvent editor_event_; | |
| 246 int64_t timestamp_; | 234 int64_t timestamp_; |
| 247 }; | 235 }; |
| 248 | 236 |
| 249 } // namespace dart | 237 } // namespace dart |
| 250 | 238 |
| 251 #endif // RUNTIME_VM_SERVICE_EVENT_H_ | 239 #endif // RUNTIME_VM_SERVICE_EVENT_H_ |
| OLD | NEW |