Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: runtime/vm/service_event.h

Issue 2962593002: Added Editor stream and sendObjectToEditor RPC into Service Protocol (Closed)
Patch Set: Added explanation comment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
59 kIllegal, 61 kIllegal,
60 }; 62 };
61 63
62 struct LogRecord { 64 struct LogRecord {
63 int64_t sequence_number; 65 int64_t sequence_number;
64 int64_t timestamp; 66 int64_t timestamp;
65 intptr_t level; 67 intptr_t level;
66 const String* name; 68 const String* name;
67 const String* message; 69 const String* message;
68 const Instance* zone; 70 const Instance* zone;
69 const Object* error; 71 const Object* error;
70 const Instance* stack_trace; 72 const Instance* stack_trace;
71 }; 73 };
72 74
73 struct ExtensionEvent { 75 struct ExtensionEvent {
74 const String* event_kind; 76 const String* event_kind;
75 const String* event_data; 77 const String* event_data;
76 }; 78 };
77 79
80 struct EditorEvent {
81 const char* editor;
82 const Object* object;
83 };
84
78 ServiceEvent(Isolate* isolate, EventKind event_kind); 85 ServiceEvent(Isolate* isolate, EventKind event_kind);
79 86
80 Isolate* isolate() const { return isolate_; } 87 Isolate* isolate() const { return isolate_; }
81 88
82 // Used by the C embedding api. 89 // Used by the C embedding api.
83 Dart_Port isolate_id() const { return isolate_->main_port(); } 90 Dart_Port isolate_id() const { return isolate_->main_port(); }
84 91
85 EventKind kind() const { return kind_; } 92 EventKind kind() const { return kind_; }
86 93
87 bool IsPause() const { 94 bool IsPause() const {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 bytes_ = bytes; 194 bytes_ = bytes;
188 bytes_length_ = bytes_length; 195 bytes_length_ = bytes_length;
189 } 196 }
190 197
191 void set_log_record(const LogRecord& log_record) { log_record_ = log_record; } 198 void set_log_record(const LogRecord& log_record) { log_record_ = log_record; }
192 199
193 void set_extension_event(const ExtensionEvent& extension_event) { 200 void set_extension_event(const ExtensionEvent& extension_event) {
194 extension_event_ = extension_event; 201 extension_event_ = extension_event;
195 } 202 }
196 203
204 void set_editor_event(const EditorEvent& editor_event) {
205 editor_event_ = editor_event;
206 }
207
197 void UpdateTimestamp(); 208 void UpdateTimestamp();
198 209
199 int64_t timestamp() const { return timestamp_; } 210 int64_t timestamp() const { return timestamp_; }
200 211
201 const TimelineEventBlock* timeline_event_block() const { 212 const TimelineEventBlock* timeline_event_block() const {
202 return timeline_event_block_; 213 return timeline_event_block_;
203 } 214 }
204 215
205 void set_timeline_event_block(const TimelineEventBlock* block) { 216 void set_timeline_event_block(const TimelineEventBlock* block) {
206 ASSERT(kind() == kTimelineEvents); 217 ASSERT(kind() == kTimelineEvents);
(...skipping 17 matching lines...) Expand all
224 const Error* reload_error_; 235 const Error* reload_error_;
225 const String* spawn_token_; 236 const String* spawn_token_;
226 const String* spawn_error_; 237 const String* spawn_error_;
227 bool at_async_jump_; 238 bool at_async_jump_;
228 const Object* inspectee_; 239 const Object* inspectee_;
229 const Heap::GCStats* gc_stats_; 240 const Heap::GCStats* gc_stats_;
230 const uint8_t* bytes_; 241 const uint8_t* bytes_;
231 intptr_t bytes_length_; 242 intptr_t bytes_length_;
232 LogRecord log_record_; 243 LogRecord log_record_;
233 ExtensionEvent extension_event_; 244 ExtensionEvent extension_event_;
245 EditorEvent editor_event_;
234 int64_t timestamp_; 246 int64_t timestamp_;
235 }; 247 };
236 248
237 } // namespace dart 249 } // namespace dart
238 250
239 #endif // RUNTIME_VM_SERVICE_EVENT_H_ 251 #endif // RUNTIME_VM_SERVICE_EVENT_H_
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698