| 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 observatory_element; | 5 library observatory_element; |
| 6 | 6 |
| 7 import 'dart:math'; | 7 import 'dart:math'; |
| 8 import 'package:polymer/polymer.dart'; | 8 import 'package:polymer/polymer.dart'; |
| 9 | 9 |
| 10 /// Base class for all Observatory custom elements. | 10 /// Base class for all Observatory custom elements. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 bool isDouble(String type) { | 155 bool isDouble(String type) { |
| 156 return type == 'Double'; | 156 return type == 'Double'; |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool isList(String type) { | 159 bool isList(String type) { |
| 160 return (type == 'GrowableObjectArray' || | 160 return (type == 'GrowableObjectArray' || |
| 161 type == 'Array'); | 161 type == 'Array'); |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool isType(String type) { |
| 165 return (type == 'Type'); |
| 166 } |
| 167 |
| 164 bool isUnexpected(String type) { | 168 bool isUnexpected(String type) { |
| 165 return (!['Null', | 169 return (!['Null', |
| 166 'Smi', | 170 'Smi', |
| 167 'Mint', | 171 'Mint', |
| 168 'Biginit', | 172 'Biginit', |
| 169 'Bool', | 173 'Bool', |
| 170 'String', | 174 'String', |
| 171 'Closure', | 175 'Closure', |
| 172 'Double', | 176 'Double', |
| 173 'Instance', | 177 'Instance', |
| 174 'GrowableObjectArray', | 178 'GrowableObjectArray', |
| 175 'Array', | 179 'Array', |
| 180 'Type', |
| 176 'Error'].contains(type)); | 181 'Error'].contains(type)); |
| 177 } | 182 } |
| 178 } | 183 } |
| OLD | NEW |