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

Side by Side Diff: runtime/observatory/lib/src/repositories/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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 part of repositories; 5 part of repositories;
6 6
7 class EventRepository implements M.EventRepository { 7 class EventRepository implements M.EventRepository {
8 final StreamController<M.Event> _onEvent; 8 final StreamController<M.Event> _onEvent;
9 Stream<M.Event> get onEvent => _onEvent.stream; 9 Stream<M.Event> get onEvent => _onEvent.stream;
10 10
(...skipping 15 matching lines...) Expand all
26 final Stream<M.ResumeEvent> onResume; 26 final Stream<M.ResumeEvent> onResume;
27 final Stream<M.BreakpointAddedEvent> onBreakpointAdded; 27 final Stream<M.BreakpointAddedEvent> onBreakpointAdded;
28 final Stream<M.BreakpointResolvedEvent> onBreakpointResolved; 28 final Stream<M.BreakpointResolvedEvent> onBreakpointResolved;
29 final Stream<M.BreakpointRemovedEvent> onBreakpointRemoved; 29 final Stream<M.BreakpointRemovedEvent> onBreakpointRemoved;
30 final Stream<M.InspectEvent> onInspect; 30 final Stream<M.InspectEvent> onInspect;
31 final Stream<M.GCEvent> onGCEvent; 31 final Stream<M.GCEvent> onGCEvent;
32 final Stream<M.LoggingEvent> onLoggingEvent; 32 final Stream<M.LoggingEvent> onLoggingEvent;
33 final Stream<M.ExtensionEvent> onExtensionEvent; 33 final Stream<M.ExtensionEvent> onExtensionEvent;
34 final Stream<M.TimelineEventsEvent> onTimelineEvents; 34 final Stream<M.TimelineEventsEvent> onTimelineEvents;
35 final Stream<M.ConnectionClosedEvent> onConnectionClosed; 35 final Stream<M.ConnectionClosedEvent> onConnectionClosed;
36 final Stream<M.ServiceEvent> onServiceEvent;
37 final Stream<M.ServiceRegisteredEvent> onServiceRegistered;
38 final Stream<M.ServiceUnregisteredEvent> onServiceUnregistered;
36 39
37 EventRepository() : this._(new StreamController.broadcast()); 40 EventRepository() : this._(new StreamController.broadcast());
38 41
39 EventRepository._(StreamController controller) 42 EventRepository._(StreamController controller)
40 : this.__( 43 : this.__(
41 controller, 44 controller,
42 controller.stream.where((e) => e is M.VMEvent), 45 controller.stream.where((e) => e is M.VMEvent),
43 controller.stream.where((e) => e is M.IsolateEvent), 46 controller.stream.where((e) => e is M.IsolateEvent),
44 controller.stream.where((e) => e is M.DebugEvent), 47 controller.stream.where((e) => e is M.DebugEvent),
45 controller.stream.where((e) => e is M.GCEvent), 48 controller.stream.where((e) => e is M.GCEvent),
46 controller.stream.where((e) => e is M.LoggingEvent), 49 controller.stream.where((e) => e is M.LoggingEvent),
47 controller.stream.where((e) => e is M.ExtensionEvent), 50 controller.stream.where((e) => e is M.ExtensionEvent),
48 controller.stream.where((e) => e is M.TimelineEventsEvent), 51 controller.stream.where((e) => e is M.TimelineEventsEvent),
49 controller.stream.where((e) => e is M.ConnectionClosedEvent)); 52 controller.stream.where((e) => e is M.ConnectionClosedEvent),
53 controller.stream.where((e) => e is M.ServiceEvent));
50 54
51 EventRepository.__( 55 EventRepository.__(
52 StreamController controller, 56 StreamController controller,
53 Stream<M.VMEvent> onVMEvent, 57 Stream<M.VMEvent> onVMEvent,
54 Stream<M.IsolateEvent> onIsolateEvent, 58 Stream<M.IsolateEvent> onIsolateEvent,
55 Stream<M.DebugEvent> onDebugEvent, 59 Stream<M.DebugEvent> onDebugEvent,
56 Stream<M.GCEvent> onGCEvent, 60 Stream<M.GCEvent> onGCEvent,
57 Stream<M.LoggingEvent> onLoggingEvent, 61 Stream<M.LoggingEvent> onLoggingEvent,
58 Stream<M.ExtensionEvent> onExtensionEvent, 62 Stream<M.ExtensionEvent> onExtensionEvent,
59 Stream<M.TimelineEventsEvent> onTimelineEvents, 63 Stream<M.TimelineEventsEvent> onTimelineEvents,
60 Stream<M.ConnectionClosedEvent> onConnectionClosed) 64 Stream<M.ConnectionClosedEvent> onConnectionClosed,
65 Stream<M.ServiceEvent> onServiceEvent)
61 : _onEvent = controller, 66 : _onEvent = controller,
62 onVMEvent = onVMEvent, 67 onVMEvent = onVMEvent,
63 onVMUpdate = onVMEvent.where((e) => e is M.VMUpdateEvent), 68 onVMUpdate = onVMEvent.where((e) => e is M.VMUpdateEvent),
64 onIsolateEvent = onIsolateEvent, 69 onIsolateEvent = onIsolateEvent,
65 onIsolateStart = onIsolateEvent.where((e) => e is M.IsolateStartEvent), 70 onIsolateStart = onIsolateEvent.where((e) => e is M.IsolateStartEvent),
66 onIsolateRunnable = 71 onIsolateRunnable =
67 onIsolateEvent.where((e) => e is M.IsolateRunnableEvent), 72 onIsolateEvent.where((e) => e is M.IsolateRunnableEvent),
68 onIsolateExit = onIsolateEvent.where((e) => e is M.IsolateExitEvent), 73 onIsolateExit = onIsolateEvent.where((e) => e is M.IsolateExitEvent),
69 onIsolateUpdate = 74 onIsolateUpdate =
70 onIsolateEvent.where((e) => e is M.IsolateUpdateEvent), 75 onIsolateEvent.where((e) => e is M.IsolateUpdateEvent),
(...skipping 15 matching lines...) Expand all
86 onDebugEvent.where((e) => e is M.BreakpointAddedEvent), 91 onDebugEvent.where((e) => e is M.BreakpointAddedEvent),
87 onBreakpointResolved = 92 onBreakpointResolved =
88 onDebugEvent.where((e) => e is M.BreakpointResolvedEvent), 93 onDebugEvent.where((e) => e is M.BreakpointResolvedEvent),
89 onBreakpointRemoved = 94 onBreakpointRemoved =
90 onDebugEvent.where((e) => e is M.BreakpointRemovedEvent), 95 onDebugEvent.where((e) => e is M.BreakpointRemovedEvent),
91 onInspect = onDebugEvent.where((e) => e is M.InspectEvent), 96 onInspect = onDebugEvent.where((e) => e is M.InspectEvent),
92 onGCEvent = onGCEvent, 97 onGCEvent = onGCEvent,
93 onLoggingEvent = onLoggingEvent, 98 onLoggingEvent = onLoggingEvent,
94 onExtensionEvent = onExtensionEvent, 99 onExtensionEvent = onExtensionEvent,
95 onTimelineEvents = onTimelineEvents, 100 onTimelineEvents = onTimelineEvents,
96 onConnectionClosed = onConnectionClosed; 101 onConnectionClosed = onConnectionClosed,
102 onServiceEvent = onServiceEvent,
103 onServiceRegistered =
104 onServiceEvent.where((e) => e is M.ServiceRegisteredEvent),
105 onServiceUnregistered =
106 onServiceEvent.where((e) => e is M.ServiceUnregisteredEvent);
97 107
98 void add(M.Event e) { 108 void add(M.Event e) {
99 _onEvent.add(e); 109 _onEvent.add(e);
100 } 110 }
101 } 111 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/models/repositories/isolate.dart ('k') | runtime/observatory/lib/src/repositories/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698