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

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

Issue 2273993002: Converted Observatory cpu-profile-table element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 cpu_profile_element; 5 library cpu_profile_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart'; 10 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart';
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 CpuProfileVirtualTreeElement tree; 124 CpuProfileVirtualTreeElement tree;
125 content.addAll([ 125 content.addAll([
126 new BRElement(), 126 new BRElement(),
127 new StackTraceTreeConfigElement(mode: _mode, direction: _direction, 127 new StackTraceTreeConfigElement(mode: _mode, direction: _direction,
128 filter: _filter, queue: _r.queue) 128 filter: _filter, queue: _r.queue)
129 ..onModeChange.listen((e) { 129 ..onModeChange.listen((e) {
130 _mode = tree.mode = e.element.mode; 130 _mode = tree.mode = e.element.mode;
131 }) 131 })
132 ..onFilterChange.listen((e) { 132 ..onFilterChange.listen((e) {
133 _filter = e.element.filter.trim(); 133 _filter = e.element.filter.trim();
134 tree.filter = _filter.isNotEmpty 134 tree.filters = _filter.isNotEmpty
135 ? (node) { return node.name.contains(_filter); } 135 ? [(node) { return node.name.contains(_filter); }]
136 : null; 136 : const [];
137 }) 137 })
138 ..onDirectionChange.listen((e) { 138 ..onDirectionChange.listen((e) {
139 _direction = tree.direction = e.element.direction; 139 _direction = tree.direction = e.element.direction;
140 }), 140 }),
141 new BRElement(), 141 new BRElement(),
142 tree = new CpuProfileVirtualTreeElement(_isolate, _progress.profile, 142 tree = new CpuProfileVirtualTreeElement(_isolate, _progress.profile,
143 queue: _r.queue) 143 queue: _r.queue)
144 ]); 144 ]);
145 } 145 }
146 children = content; 146 children = content;
(...skipping 17 matching lines...) Expand all
164 await _request(clear: true); 164 await _request(clear: true);
165 e.element.disabled = false; 165 e.element.disabled = false;
166 } 166 }
167 167
168 Future _refresh(e) async { 168 Future _refresh(e) async {
169 e.element.disabled = true; 169 e.element.disabled = true;
170 await _request(forceFetch: true); 170 await _request(forceFetch: true);
171 e.element.disabled = false; 171 e.element.disabled = false;
172 } 172 }
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698