| Index: runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
|
| diff --git a/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart b/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..21323a8d8f30ae794abc604482ad12a558844359
|
| --- /dev/null
|
| +++ b/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
|
| @@ -0,0 +1,42 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +import 'dart:html';
|
| +import 'package:observatory/service_html.dart';
|
| +import 'shims/binding.dart';
|
| +import 'helpers/tag.dart';
|
| +import 'isolate_ref.dart';
|
| +
|
| +class IsolateRefElementWrapper extends HtmlElement {
|
| +
|
| + static final binder = new Binder<IsolateRefElementWrapper>(
|
| + const [const Binding('ref')]);
|
| +
|
| + static const tag = const Tag<IsolateRefElementWrapper>('isolate-ref');
|
| +
|
| + Isolate _ref;
|
| + Isolate get ref => _ref;
|
| + void set ref(Isolate ref) { _ref = ref; render();}
|
| +
|
| + IsolateRefElementWrapper.created() : super.created() {
|
| + binder.registerCallback(this);
|
| + createShadowRoot();
|
| + render();
|
| + }
|
| +
|
| + @override
|
| + void attached() {
|
| + super.attached();
|
| + render();
|
| + }
|
| +
|
| + void render() {
|
| + shadowRoot.children = [];
|
| + if (ref == null) return;
|
| +
|
| + shadowRoot.children = [
|
| + new IsolateRefElement(isolate: _ref)
|
| + ];
|
| + }
|
| +}
|
|
|