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

Side by Side Diff: runtime/observatory/lib/src/elements/service_view.dart

Issue 2291233002: Converted Observatory instance-view element (Closed)
Patch Set: Addressed comments 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) 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 library service_object_view_element; 5 library service_object_view_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'package:observatory/tracer.dart'; 10 import 'package:observatory/tracer.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return element; 45 return element;
46 case 'Library': 46 case 'Library':
47 LibraryViewElement element = new Element.tag('library-view'); 47 LibraryViewElement element = new Element.tag('library-view');
48 element.library = object; 48 element.library = object;
49 return element; 49 return element;
50 case 'VM': 50 case 'VM':
51 VMViewElement element = new Element.tag('vm-view'); 51 VMViewElement element = new Element.tag('vm-view');
52 element.vm = object; 52 element.vm = object;
53 return element; 53 return element;
54 default: 54 default:
55 if (object.isInstance || 55 JsonViewElement element = new Element.tag('json-view');
56 object.isSentinel) { // TODO(rmacnak): Separate this out. 56 element.map = object;
57 InstanceViewElement element = new Element.tag('instance-view'); 57 return element;
58 element.instance = object;
59 return element;
60 } else {
61 JsonViewElement element = new Element.tag('json-view');
62 element.map = object;
63 return element;
64 }
65 } 58 }
66 } 59 }
67 60
68 objectChanged(oldValue) { 61 objectChanged(oldValue) {
69 // Remove the current view. 62 // Remove the current view.
70 children.clear(); 63 children.clear();
71 if (object == null) { 64 if (object == null) {
72 Logger.root.info('Viewing null object.'); 65 Logger.root.info('Viewing null object.');
73 return; 66 return;
74 } 67 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 121
129 dynamic expander() { 122 dynamic expander() {
130 return expandEvent; 123 return expandEvent;
131 } 124 }
132 125
133 void expandEvent(bool exp, var done) { 126 void expandEvent(bool exp, var done) {
134 expand = exp; 127 expand = exp;
135 done(); 128 done();
136 } 129 }
137 } 130 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/sentinel_view.dart ('k') | runtime/observatory/lib/src/elements/service_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698