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

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

Issue 2283863003: Converted Observatory object-pool-view element (Closed)
Patch Set: 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 AllocationProfileRepository _allocationProfileRepository 7 AllocationProfileRepository _allocationProfileRepository
8 = new AllocationProfileRepository(); 8 = new AllocationProfileRepository();
9 ContextRepository _contextRepository = new ContextRepository(); 9 ContextRepository _contextRepository = new ContextRepository();
10 HeapSnapshotRepository _heapSnapshotRepository 10 HeapSnapshotRepository _heapSnapshotRepository
11 = new HeapSnapshotRepository(); 11 = new HeapSnapshotRepository();
12 ICDataRepository _icdataRepository = new ICDataRepository(); 12 ICDataRepository _icdataRepository = new ICDataRepository();
13 InboundReferencesRepository _inboundReferencesRepository 13 InboundReferencesRepository _inboundReferencesRepository
14 = new InboundReferencesRepository(); 14 = new InboundReferencesRepository();
15 InstanceRepository _instanceRepository = new InstanceRepository(); 15 InstanceRepository _instanceRepository = new InstanceRepository();
16 IsolateSampleProfileRepository _isolateSampleProfileRepository 16 IsolateSampleProfileRepository _isolateSampleProfileRepository
17 = new IsolateSampleProfileRepository(); 17 = new IsolateSampleProfileRepository();
18 ObjectPoolRepository _objectPoolRepository
19 = new ObjectPoolRepository();
18 ObjectStoreRepository _objectstoreRepository 20 ObjectStoreRepository _objectstoreRepository
19 = new ObjectStoreRepository(); 21 = new ObjectStoreRepository();
20 PersistentHandlesRepository _persistentHandlesRepository 22 PersistentHandlesRepository _persistentHandlesRepository
21 = new PersistentHandlesRepository(); 23 = new PersistentHandlesRepository();
22 PortsRepository _portsRepository = new PortsRepository(); 24 PortsRepository _portsRepository = new PortsRepository();
23 25
24 class IsolateNotFound implements Exception { 26 class IsolateNotFound implements Exception {
25 String isolateId; 27 String isolateId;
26 IsolateNotFound(this.isolateId); 28 IsolateNotFound(this.isolateId);
27 String toString() => "IsolateNotFound: $isolateId"; 29 String toString() => "IsolateNotFound: $isolateId";
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 }); 180 });
179 } 181 }
180 182
181 void onInstall() { 183 void onInstall() {
182 if (element == null) { 184 if (element == null) {
183 element = container; 185 element = container;
184 } 186 }
185 assert(element != null); 187 assert(element != null);
186 } 188 }
187 189
188 void _visitObject(obj) { 190 Future _visitObject(obj) async {
191 container.children = [];
192 await obj.reload();
189 if (obj is Context) { 193 if (obj is Context) {
190 container.children = [ 194 container.children = [
191 new ContextViewElement(app.vm, obj.isolate, obj, app.events, 195 new ContextViewElement(app.vm, obj.isolate, obj, app.events,
192 app.notifications, 196 app.notifications,
193 _contextRepository, 197 _contextRepository,
194 _retainedSizeRepository, 198 _retainedSizeRepository,
195 _reachableSizeRepository, 199 _reachableSizeRepository,
196 _inboundReferencesRepository, 200 _inboundReferencesRepository,
197 _retainingPathRepository, 201 _retainingPathRepository,
198 _instanceRepository, 202 _instanceRepository,
199 queue: app.queue) 203 queue: app.queue)
200 ]; 204 ];
201 } else if (obj is DartError) { 205 } else if (obj is DartError) {
202 container.children = [ 206 container.children = [
203 new ErrorViewElement(app.notifications, obj, queue: app.queue) 207 new ErrorViewElement(app.notifications, obj, queue: app.queue)
204 ]; 208 ];
205 } else if (obj is ICData) { 209 } else if (obj is ICData) {
206 container.children = [ 210 container.children = [
207 new ICDataViewElement(app.vm, obj.isolate, obj, app.events, 211 new ICDataViewElement(app.vm, obj.isolate, obj, app.events,
208 app.notifications, 212 app.notifications,
209 _icdataRepository, 213 _icdataRepository,
210 _retainedSizeRepository, 214 _retainedSizeRepository,
211 _reachableSizeRepository, 215 _reachableSizeRepository,
212 _inboundReferencesRepository, 216 _inboundReferencesRepository,
213 _retainingPathRepository, 217 _retainingPathRepository,
214 _instanceRepository, 218 _instanceRepository,
215 queue: app.queue) 219 queue: app.queue)
216 ]; 220 ];
221 } else if (obj is ObjectPool) {
222 container.children = [
223 new ObjectPoolViewElement(app.vm, obj.isolate, obj, app.events,
224 app.notifications,
225 _objectPoolRepository,
226 _retainedSizeRepository,
227 _reachableSizeRepository,
228 _inboundReferencesRepository,
229 _retainingPathRepository,
230 _instanceRepository,
231 queue: app.queue)
232 ];
217 } else { 233 } else {
218 ServiceObjectViewElement serviceElement =new Element.tag('service-view'); 234 ServiceObjectViewElement serviceElement =new Element.tag('service-view');
219 serviceElement.object = obj; 235 serviceElement.object = obj;
220 container.children = [serviceElement]; 236 container.children = [serviceElement];
221 } 237 }
222 } 238 }
223 } 239 }
224 240
225 241
226 /// Class tree page. 242 /// Class tree page.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 assert(element != null); 625 assert(element != null);
610 } 626 }
611 627
612 void _visit(Uri uri) { 628 void _visit(Uri uri) {
613 assert(element != null); 629 assert(element != null);
614 assert(canVisit(uri)); 630 assert(canVisit(uri));
615 } 631 }
616 632
617 bool canVisit(Uri uri) => uri.path == 'timeline'; 633 bool canVisit(Uri uri) => uri.path == 'timeline';
618 } 634 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698