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 service_ref_element; | 5 library service_ref_element; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'package:logging/logging.dart'; | 8 import 'package:logging/logging.dart'; |
9 import 'package:polymer/polymer.dart'; | 9 import 'package:polymer/polymer.dart'; |
10 import 'observatory_element.dart'; | 10 import 'observatory_element.dart'; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 refChanged(oldValue) { | 117 refChanged(oldValue) { |
118 // Remove the current view. | 118 // Remove the current view. |
119 children.clear(); | 119 children.clear(); |
120 if (ref == null) { | 120 if (ref == null) { |
121 Logger.root.info('Viewing null object.'); | 121 Logger.root.info('Viewing null object.'); |
122 return; | 122 return; |
123 } | 123 } |
124 var type = ref.vmType; | 124 var type = ref.type; |
125 var element = _constructElementForRef(); | 125 var element = _constructElementForRef(); |
126 if (element == null) { | 126 if (element == null) { |
127 Logger.root.info('Unable to find a ref element for \'${type}\''); | 127 Logger.root.info('Unable to find a ref element for \'${type}\''); |
128 return; | 128 return; |
129 } | 129 } |
130 children.add(element); | 130 children.add(element); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 @CustomTag('object-ref') | 134 @CustomTag('object-ref') |
135 class ObjectRefElement extends ServiceRefElement { | 135 class ObjectRefElement extends ServiceRefElement { |
136 ObjectRefElement.created() : super.created(); | 136 ObjectRefElement.created() : super.created(); |
137 } | 137 } |
OLD | NEW |