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 isolate_view_element; | 5 library isolate_view_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/curly_block.dart'; | 10 import 'package:observatory/src/elements/curly_block.dart'; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 detached() { | 127 detached() { |
128 super.detached(); | 128 super.detached(); |
129 _r.disable(notify: true); | 129 _r.disable(notify: true); |
130 children = []; | 130 children = []; |
131 _subscription.cancel(); | 131 _subscription.cancel(); |
132 } | 132 } |
133 | 133 |
134 void render() { | 134 void render() { |
135 final uptime = new DateTime.now().difference(_isolate.startTime); | 135 final uptime = new DateTime.now().difference(_isolate.startTime); |
136 final libraries = _isolate.libraries.toList(); | 136 final libraries = _isolate.libraries.toList(); |
137 final List<Thread> threads = _isolate.threads; | 137 final List<M.Thread> threads = _isolate.threads; |
138 children = [ | 138 children = [ |
139 navBar([ | 139 navBar([ |
140 new NavTopMenuElement(queue: _r.queue), | 140 new NavTopMenuElement(queue: _r.queue), |
141 new NavVMMenuElement(_vm, _events, queue: _r.queue), | 141 new NavVMMenuElement(_vm, _events, queue: _r.queue), |
142 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), | 142 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), |
143 new NavRefreshElement(label: 'Reload Source', queue: _r.queue) | 143 new NavRefreshElement(label: 'Reload Source', queue: _r.queue) |
144 ..onRefresh.listen((e) async { | 144 ..onRefresh.listen((e) async { |
145 e.element.disabled = true; | 145 e.element.disabled = true; |
146 await _isolates.reloadSources(_isolate); | 146 await _isolates.reloadSources(_isolate); |
147 _r.dirty(); | 147 _r.dirty(); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 _isolate, _rootScript, _scripts, _instances, _events, | 355 _isolate, _rootScript, _scripts, _instances, _events, |
356 queue: _r.queue) | 356 queue: _r.queue) |
357 ] | 357 ] |
358 : const [], | 358 : const [], |
359 new HRElement(), | 359 new HRElement(), |
360 new ViewFooterElement(queue: _r.queue) | 360 new ViewFooterElement(queue: _r.queue) |
361 ] | 361 ] |
362 ]; | 362 ]; |
363 } | 363 } |
364 | 364 |
365 DivElement _populateThreadInfo(Thread t) { | 365 DivElement _populateThreadInfo(M.Thread t) { |
366 int index = 0; | 366 int index = 0; |
367 return new DivElement() | 367 return new DivElement() |
368 ..classes = ['indent'] | 368 ..classes = ['indent'] |
369 ..children = [ | 369 ..children = [ |
370 new SpanElement()..text = '${t.id} ', | 370 new SpanElement()..text = '${t.id} ', |
371 new CurlyBlockElement(queue: _r.queue) | 371 new CurlyBlockElement(queue: _r.queue) |
372 ..content = [ | 372 ..content = [ |
373 new DivElement() | 373 new DivElement() |
374 ..classes = ['indent'] | 374 ..classes = ['indent'] |
375 ..text = 'kind ${t.kindString}', | 375 ..text = 'kind ${t.kindString}', |
(...skipping 19 matching lines...) Expand all Loading... |
395 _function = await _functions.get(_isolate, frame.function.id); | 395 _function = await _functions.get(_isolate, frame.function.id); |
396 } | 396 } |
397 if (_isolate.rootLibrary != null) { | 397 if (_isolate.rootLibrary != null) { |
398 final rootLibrary = | 398 final rootLibrary = |
399 await _libraries.get(_isolate, _isolate.rootLibrary.id); | 399 await _libraries.get(_isolate, _isolate.rootLibrary.id); |
400 _rootScript = rootLibrary.rootScript; | 400 _rootScript = rootLibrary.rootScript; |
401 } | 401 } |
402 _r.dirty(); | 402 _r.dirty(); |
403 } | 403 } |
404 } | 404 } |
OLD | NEW |