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

Side by Side Diff: runtime/observatory/lib/src/app/application.dart

Issue 2304463002: Converted Observatory vm-view && isolate-view elements (Closed)
Patch Set: Fixed typo Created 4 years, 3 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/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/app/event.dart » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 app; 5 part of app;
6 6
7 /// The observatory application. Instances of this are created and owned 7 /// The observatory application. Instances of this are created and owned
8 /// by the observatory_application custom element. 8 /// by the observatory_application custom element.
9 class ObservatoryApplication extends Observable { 9 class ObservatoryApplication extends Observable {
10 static ObservatoryApplication app; 10 static ObservatoryApplication app;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void _deletePauseEvents(e) { 89 void _deletePauseEvents(e) {
90 notifications.deletePauseEvents(isolate: e.isolate); 90 notifications.deletePauseEvents(isolate: e.isolate);
91 } 91 }
92 void _addNotification(M.Event e) { 92 void _addNotification(M.Event e) {
93 notifications.add(new EventNotification(e)); 93 notifications.add(new EventNotification(e));
94 } 94 }
95 95
96 void _onEvent(ServiceEvent event) { 96 void _onEvent(ServiceEvent event) {
97 assert(event.kind != ServiceEvent.kNone); 97 assert(event.kind != ServiceEvent.kNone);
98 98
99 M.Event e; 99 M.Event e = createEventFromServiceEvent(event);
100 100 if (e != null) {
101 switch(event.kind) { 101 events.add(e);
102 case ServiceEvent.kVMUpdate:
103 e = new VMUpdateEvent(event.timestamp, event.vm);
104 break;
105 case ServiceEvent.kIsolateStart:
106 e = new IsolateStartEvent(event.timestamp, event.isolate);
107 break;
108 case ServiceEvent.kIsolateRunnable:
109 e = new IsolateRunnableEvent(event.timestamp, event.isolate);
110 break;
111 case ServiceEvent.kIsolateUpdate:
112 e = new IsolateUpdateEvent(event.timestamp, event.isolate);
113 break;
114 case ServiceEvent.kIsolateReload:
115 e = new IsolateReloadEvent(event.timestamp, event.isolate, event.error);
116 break;
117 case ServiceEvent.kIsolateExit:
118 e = new IsolateExitEvent(event.timestamp, event.isolate);
119 break;
120 case ServiceEvent.kBreakpointAdded:
121 e = new BreakpointAddedEvent(event.timestamp, event.isolate,
122 event.breakpoint);
123 break;
124 case ServiceEvent.kBreakpointResolved:
125 e = new BreakpointResolvedEvent(event.timestamp, event.isolate,
126 event.breakpoint);
127 break;
128 case ServiceEvent.kBreakpointRemoved:
129 e = new BreakpointRemovedEvent(event.timestamp, event.isolate,
130 event.breakpoint);
131 break;
132 case ServiceEvent.kDebuggerSettingsUpdate:
133 e = new DebuggerSettingsUpdateEvent(event.timestamp, event.isolate);
134 break;
135 case ServiceEvent.kResume:
136 e = new ResumeEvent(event.timestamp, event.isolate, event.topFrame);
137 break;
138 case ServiceEvent.kPauseStart:
139 e = new PauseStartEvent(event.timestamp, event.isolate);
140 break;
141 case ServiceEvent.kPauseExit:
142 e = new PauseExitEvent(event.timestamp, event.isolate);
143 break;
144 case ServiceEvent.kPauseBreakpoint:
145 e = new PauseBreakpointEvent(event.timestamp, event.isolate,
146 event.pauseBreakpoints, event.topFrame, event.atAsyncSuspension,
147 event.breakpoint);
148 break;
149 case ServiceEvent.kPauseInterrupted:
150 e = new PauseInterruptedEvent(event.timestamp, event.isolate,
151 event.topFrame, event.atAsyncSuspension);
152 break;
153 case ServiceEvent.kPauseException:
154 e = new PauseExceptionEvent(event.timestamp, event.isolate,
155 event.topFrame, event.exception);
156 break;
157 case ServiceEvent.kInspect:
158 e = new InspectEvent(event.timestamp, event.isolate,
159 event.inspectee);
160 break;
161 case ServiceEvent.kGC:
162 e = new GCEvent(event.timestamp, event.isolate);
163 break;
164 default:
165 // Ignore unrecognized events.
166 Logger.root.severe('Unrecognized event: $event');
167 return;
168 } 102 }
169 events.add(e);
170 } 103 }
171 104
172 void _registerPages() { 105 void _registerPages() {
173 _pageRegistry.add(new VMPage(this)); 106 _pageRegistry.add(new VMPage(this));
174 _pageRegistry.add(new FlagsPage(this)); 107 _pageRegistry.add(new FlagsPage(this));
175 _pageRegistry.add(new InspectPage(this)); 108 _pageRegistry.add(new InspectPage(this));
176 _pageRegistry.add(new ClassTreePage(this)); 109 _pageRegistry.add(new ClassTreePage(this));
177 _pageRegistry.add(new DebuggerPage(this)); 110 _pageRegistry.add(new DebuggerPage(this));
178 _pageRegistry.add(new ObjectStorePage(this)); 111 _pageRegistry.add(new ObjectStorePage(this));
179 _pageRegistry.add(new CpuProfilerPage(this)); 112 _pageRegistry.add(new CpuProfilerPage(this));
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 227 }
295 228
296 // TODO(turnidge): Report this failure via analytics. 229 // TODO(turnidge): Report this failure via analytics.
297 Logger.root.warning('Caught exception: ${e}\n${st}'); 230 Logger.root.warning('Caught exception: ${e}\n${st}');
298 notifications.add(new ExceptionNotification(e, stacktrace: st)); 231 notifications.add(new ExceptionNotification(e, stacktrace: st));
299 } 232 }
300 233
301 // This map keeps track of which curly-blocks have been expanded by the user. 234 // This map keeps track of which curly-blocks have been expanded by the user.
302 Map<String,bool> expansions = {}; 235 Map<String,bool> expansions = {};
303 } 236 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/app/event.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698