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

Unified Diff: runtime/observatory/lib/event.dart

Issue 2980733003: Introduced support for external services registration in the ServiceProtocol (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/.packages ('k') | runtime/observatory/lib/models.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/event.dart
diff --git a/runtime/observatory/lib/event.dart b/runtime/observatory/lib/event.dart
index fbbd3e5460bd9162f83e3fd6be7892245df8c638..e79b16b3c6120c1f42688d2912e732ceb35a7897 100644
--- a/runtime/observatory/lib/event.dart
+++ b/runtime/observatory/lib/event.dart
@@ -284,6 +284,31 @@ class ConnectionClosedEvent implements M.ConnectionClosedEvent {
}
}
+class ServiceRegisteredEvent implements M.ServiceRegisteredEvent {
+ final DateTime timestamp;
+ final String service;
+ final String method;
+ final String alias;
+ ServiceRegisteredEvent(
+ this.timestamp, this.service, this.method, this.alias) {
+ assert(timestamp != null);
+ assert(service != null);
+ assert(method != null);
+ assert(alias != null);
+ }
+}
+
+class ServiceUnregisteredEvent implements M.ServiceUnregisteredEvent {
+ final DateTime timestamp;
+ final String service;
+ final String method;
+ ServiceUnregisteredEvent(this.timestamp, this.service, this.method) {
+ assert(timestamp != null);
+ assert(service != null);
+ assert(method != null);
+ }
+}
+
M.Event createEventFromServiceEvent(S.ServiceEvent event) {
switch (event.kind) {
case S.ServiceEvent.kVMUpdate:
@@ -339,6 +364,12 @@ M.Event createEventFromServiceEvent(S.ServiceEvent event) {
return new InspectEvent(event.timestamp, event.isolate, event.inspectee);
case S.ServiceEvent.kGC:
return new GCEvent(event.timestamp, event.isolate);
+ case S.ServiceEvent.kServiceRegistered:
+ return new ServiceRegisteredEvent(
+ event.timestamp, event.service, event.method, event.alias);
+ case S.ServiceEvent.kServiceUnregistered:
+ return new ServiceUnregisteredEvent(
+ event.timestamp, event.service, event.method);
case S.ServiceEvent.kNone:
return new NoneEvent(event.timestamp, event.isolate);
default:
« no previous file with comments | « runtime/observatory/.packages ('k') | runtime/observatory/lib/models.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698