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

Unified Diff: runtime/vm/service_event.cc

Issue 2962593002: Added Editor stream and sendObjectToEditor RPC into Service Protocol (Closed)
Patch Set: Added explanation comment Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 5d7cc75851eb3359fd2cf588266e835e0d871126..336d1594112984fb8806a6b1db7d6d47ab4471e0 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -111,6 +111,8 @@ const char* ServiceEvent::KindAsCString() const {
return "Extension";
case kTimelineEvents:
return "TimelineEvents";
+ case kEditorObjectSelected:
+ return "_EditorObjectSelected";
default:
UNREACHABLE();
return "Unknown";
@@ -162,6 +164,9 @@ const StreamInfo* ServiceEvent::stream_info() const {
case kEmbedder:
return NULL;
+ case kEditorObjectSelected:
+ return &Service::editor_stream;
+
default:
UNREACHABLE();
return NULL;
@@ -262,6 +267,12 @@ void ServiceEvent::PrintJSON(JSONStream* js) const {
js->AppendSerializedObject("extensionData",
extension_event_.event_data->ToCString());
}
+ if (kind() == kEditorObjectSelected) {
+ if (editor_event_.object != NULL) {
+ jsobj.AddProperty("editor", editor_event_.editor);
+ jsobj.AddProperty("object", *(editor_event_.object));
+ }
+ }
}
« no previous file with comments | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698