| OLD | NEW |
| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 children = []; | 94 children = []; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void render() { | 97 void render() { |
| 98 var content = [ | 98 var content = [ |
| 99 new NavBarElement(queue: _r.queue) | 99 new NavBarElement(queue: _r.queue) |
| 100 ..children = [ | 100 ..children = [ |
| 101 new NavTopMenuElement(queue: _r.queue), | 101 new NavTopMenuElement(queue: _r.queue), |
| 102 new NavVMMenuElement(_vm, _events, queue: _r.queue), | 102 new NavVMMenuElement(_vm, _events, queue: _r.queue), |
| 103 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), | 103 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), |
| 104 new NavMenuElement('cpu profile', link: Uris.profiler(_isolate), | 104 new NavMenuElement('cpu profile', link: Uris.cpuProfiler(_isolate), |
| 105 last: true, queue: _r.queue), | 105 last: true, queue: _r.queue), |
| 106 new NavRefreshElement(queue: _r.queue) | 106 new NavRefreshElement(queue: _r.queue) |
| 107 ..onRefresh.listen(_refresh), | 107 ..onRefresh.listen(_refresh), |
| 108 new NavRefreshElement(label: 'Clear', queue: _r.queue) | 108 new NavRefreshElement(label: 'Clear', queue: _r.queue) |
| 109 ..onRefresh.listen(_clearCpuProfile), | 109 ..onRefresh.listen(_clearCpuProfile), |
| 110 new NavNotifyElement(_notifications, queue: _r.queue) | 110 new NavNotifyElement(_notifications, queue: _r.queue) |
| 111 ], | 111 ], |
| 112 ]; | 112 ]; |
| 113 if (_progress == null) { | 113 if (_progress == null) { |
| 114 children = content; | 114 children = content; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |