OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
8 import 'package:observatory/src/elements/curly_block.dart'; | 8 import 'package:observatory/src/elements/curly_block.dart'; |
9 import 'package:observatory/src/elements/instance_ref.dart'; | 9 import 'package:observatory/src/elements/instance_ref.dart'; |
10 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 10 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 @override | 64 @override |
65 void detached() { | 65 void detached() { |
66 super.detached(); | 66 super.detached(); |
67 children = []; | 67 children = []; |
68 _r.disable(notify: true); | 68 _r.disable(notify: true); |
69 } | 69 } |
70 | 70 |
71 void render() { | 71 void render() { |
72 children = [ | 72 children = [ |
73 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) | 73 new CurlyBlockElement(expanded: _expanded, queue: _r.queue) |
74 ..children = _createContent() | 74 ..content = _createContent() |
75 ..onToggle.listen((e) async { | 75 ..onToggle.listen((e) async { |
76 _expanded = e.control.expanded; | 76 _expanded = e.control.expanded; |
77 e.control.disabled = true; | 77 e.control.disabled = true; |
78 await _refresh(); | 78 await _refresh(); |
79 e.control.disabled = false; | 79 e.control.disabled = false; |
80 }) | 80 }) |
81 ]; | 81 ]; |
82 } | 82 } |
83 | 83 |
84 Future _refresh() async { | 84 Future _refresh() async { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ..text = 'show next ${count}'; | 117 ..text = 'show next ${count}'; |
118 button.onClick.listen((_) async { | 118 button.onClick.listen((_) async { |
119 button.disabled = true; | 119 button.disabled = true; |
120 _result = await _stronglyReachableInstances.get(_isolate, _cls, | 120 _result = await _stronglyReachableInstances.get(_isolate, _cls, |
121 limit: count * 2); | 121 limit: count * 2); |
122 _r.dirty(); | 122 _r.dirty(); |
123 }); | 123 }); |
124 return [button]; | 124 return [button]; |
125 } | 125 } |
126 } | 126 } |
OLD | NEW |