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_ref_element; | 5 library isolate_ref_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 show IsolateRef, EventRepository; | 10 show IsolateRef, EventRepository; |
11 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 11 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
12 import 'package:observatory/src/elements/helpers/tag.dart'; | 12 import 'package:observatory/src/elements/helpers/tag.dart'; |
13 import 'package:observatory/src/elements/helpers/uris.dart'; | 13 import 'package:observatory/src/elements/helpers/uris.dart'; |
14 | 14 |
15 class IsolateRefElement extends HtmlElement implements Renderable { | 15 class IsolateRefElement extends HtmlElement implements Renderable { |
16 static const tag = const Tag<IsolateRefElement>('isolate-ref-wrapped'); | 16 static const tag = const Tag<IsolateRefElement>('isolate-ref'); |
17 | 17 |
18 RenderingScheduler<IsolateRefElement> _r; | 18 RenderingScheduler<IsolateRefElement> _r; |
19 | 19 |
20 Stream<RenderedEvent<IsolateRefElement>> get onRendered => _r.onRendered; | 20 Stream<RenderedEvent<IsolateRefElement>> get onRendered => _r.onRendered; |
21 | 21 |
22 | 22 |
23 M.IsolateRef _isolate; | 23 M.IsolateRef _isolate; |
24 M.EventRepository _events; | 24 M.EventRepository _events; |
25 StreamSubscription _updatesSubscription; | 25 StreamSubscription _updatesSubscription; |
26 | 26 |
(...skipping 30 matching lines...) Expand all Loading... |
57 } | 57 } |
58 | 58 |
59 void render() { | 59 void render() { |
60 children = [ | 60 children = [ |
61 new AnchorElement(href: Uris.inspect(isolate)) | 61 new AnchorElement(href: Uris.inspect(isolate)) |
62 ..text = 'Isolate ${isolate.number} (${isolate.name})' | 62 ..text = 'Isolate ${isolate.number} (${isolate.name})' |
63 ..classes = ['isolate-ref'] | 63 ..classes = ['isolate-ref'] |
64 ]; | 64 ]; |
65 } | 65 } |
66 } | 66 } |
OLD | NEW |