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 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 show IsolateRef, PcDescriptorsRef; | 8 show IsolateRef, PcDescriptorsRef; |
9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
10 import 'package:observatory/src/elements/helpers/tag.dart'; | 10 import 'package:observatory/src/elements/helpers/tag.dart'; |
11 import 'package:observatory/src/elements/helpers/uris.dart'; | 11 import 'package:observatory/src/elements/helpers/uris.dart'; |
12 | 12 |
13 class PcDescriptorsRefElement extends HtmlElement implements Renderable { | 13 class PcDescriptorsRefElement extends HtmlElement implements Renderable { |
14 static const tag = const Tag<PcDescriptorsRefElement>('pc-ref-wrapped'); | 14 static const tag = const Tag<PcDescriptorsRefElement>('pc-ref'); |
15 | 15 |
16 RenderingScheduler<PcDescriptorsRefElement> _r; | 16 RenderingScheduler<PcDescriptorsRefElement> _r; |
17 | 17 |
18 Stream<RenderedEvent<PcDescriptorsRefElement>> get onRendered => | 18 Stream<RenderedEvent<PcDescriptorsRefElement>> get onRendered => |
19 _r.onRendered; | 19 _r.onRendered; |
20 | 20 |
21 M.IsolateRef _isolate; | 21 M.IsolateRef _isolate; |
22 M.PcDescriptorsRef _descriptors; | 22 M.PcDescriptorsRef _descriptors; |
23 | 23 |
24 M.IsolateRef get isolate => _isolate; | 24 M.IsolateRef get isolate => _isolate; |
(...skipping 28 matching lines...) Expand all Loading... |
53 void render() { | 53 void render() { |
54 final text = (_descriptors.name == null || _descriptors.name == '') | 54 final text = (_descriptors.name == null || _descriptors.name == '') |
55 ? 'PcDescriptors' | 55 ? 'PcDescriptors' |
56 : _descriptors.name; | 56 : _descriptors.name; |
57 children = [ | 57 children = [ |
58 new AnchorElement(href: Uris.inspect(_isolate, object: _descriptors)) | 58 new AnchorElement(href: Uris.inspect(_isolate, object: _descriptors)) |
59 ..text = text | 59 ..text = text |
60 ]; | 60 ]; |
61 } | 61 } |
62 } | 62 } |
OLD | NEW |