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

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

Issue 2204563003: Converted Observatory cpu-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 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 library class_tree_element; 5 library class_tree_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/class_ref.dart'; 10 import 'package:observatory/src/elements/class_ref.dart';
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 .expand((f) => f) 140 .expand((f) => f)
141 ..forEach((subcls) { 141 ..forEach((subcls) {
142 _mixins[subcls.id] = (_mixins[subcls.id] ?? [])..add(cls.mixin); 142 _mixins[subcls.id] = (_mixins[subcls.id] ?? [])..add(cls.mixin);
143 }); 143 });
144 } 144 }
145 145
146 static Element _create(toggle) { 146 static Element _create(toggle) {
147 return new DivElement()..classes = ['class-tree-item'] 147 return new DivElement()..classes = ['class-tree-item']
148 ..children = [ 148 ..children = [
149 new SpanElement()..classes = ['lines'], 149 new SpanElement()..classes = ['lines'],
150 new SpanElement()..classes = ['expander'] 150 new ButtonElement()..classes = ['expander']
151 ..onClick.listen((_) => toggle(autoToggleSingleChildNodes: true)), 151 ..onClick.listen((_) => toggle(autoToggleSingleChildNodes: true)),
152 new SpanElement()..classes = ['name'] 152 new SpanElement()..classes = ['name']
153 ]; 153 ];
154 } 154 }
155 155
156 void _update(HtmlElement el, M.Class cls, int index) { 156 void _update(HtmlElement el, M.Class cls, int index) {
157 virtualTreeUpdateLines(el.children[0], index); 157 virtualTreeUpdateLines(el.children[0], index);
158 if (cls.subclasses.isEmpty) { 158 if (cls.subclasses.isEmpty) {
159 el.children[1].text = ''; 159 el.children[1].text = '';
160 } else { 160 } else {
(...skipping 15 matching lines...) Expand all
176 : new ClassRefElement(_isolate, type.typeClass, queue: _r.queue) 176 : new ClassRefElement(_isolate, type.typeClass, queue: _r.queue)
177 ]).toList(); 177 ]).toList();
178 children.first.text = ' with '; 178 children.first.text = ' with ';
179 return children; 179 return children;
180 } 180 }
181 181
182 Iterable<M.Class> _children(M.Class cls) { 182 Iterable<M.Class> _children(M.Class cls) {
183 return _subclasses[cls.id]; 183 return _subclasses[cls.id];
184 } 184 }
185 } 185 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/cpu_profile/cpu_profile.dart ('k') | runtime/observatory/lib/src/elements/class_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698