| 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:html'; |
| 7 import 'package:observatory/app.dart'; | 8 import 'package:observatory/app.dart'; |
| 8 import 'package:polymer/polymer.dart'; | 9 import 'package:polymer/polymer.dart'; |
| 9 | 10 |
| 10 /// Base class for all Observatory custom elements. | 11 /// Base class for all Observatory custom elements. |
| 11 @CustomTag('observatory-element') | 12 @CustomTag('observatory-element') |
| 12 class ObservatoryElement extends PolymerElement { | 13 class ObservatoryElement extends PolymerElement { |
| 13 ObservatoryElement.created() : super.created(); | 14 ObservatoryElement.created() : super.created(); |
| 14 | 15 |
| 15 void enteredView() { | 16 void enteredView() { |
| 16 super.enteredView(); | 17 super.enteredView(); |
| 17 } | 18 } |
| 18 | 19 |
| 19 void leftView() { | 20 void leftView() { |
| 20 super.leftView(); | 21 super.leftView(); |
| 21 } | 22 } |
| 22 | 23 |
| 23 void ready() { | 24 void ready() { |
| 24 super.ready(); | 25 super.ready(); |
| 25 } | 26 } |
| 26 | 27 |
| 28 void goto(MouseEvent event, var detail, Element target) { |
| 29 location.onGoto(event, detail, target); |
| 30 } |
| 31 |
| 32 String gotoLink(String url) { |
| 33 return location.makeLink(url); |
| 34 } |
| 35 |
| 27 void attributeChanged(String name, var oldValue, var newValue) { | 36 void attributeChanged(String name, var oldValue, var newValue) { |
| 28 super.attributeChanged(name, oldValue, newValue); | 37 super.attributeChanged(name, oldValue, newValue); |
| 29 } | 38 } |
| 30 | 39 |
| 31 String formatTimePrecise(double time) => Utils.formatTimePrecise(time); | 40 String formatTimePrecise(double time) => Utils.formatTimePrecise(time); |
| 32 | 41 |
| 33 String formatTime(double time) => Utils.formatTime(time); | 42 String formatTime(double time) => Utils.formatTime(time); |
| 34 | 43 |
| 35 String formatSeconds(double x) => Utils.formatSeconds(x); | 44 String formatSeconds(double x) => Utils.formatSeconds(x); |
| 36 | 45 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 'Bool', | 99 'Bool', |
| 91 'String', | 100 'String', |
| 92 'Double', | 101 'Double', |
| 93 'Instance', | 102 'Instance', |
| 94 'GrowableObjectArray', | 103 'GrowableObjectArray', |
| 95 'Array', | 104 'Array', |
| 96 'Type', | 105 'Type', |
| 97 'Error'].contains(type)); | 106 'Error'].contains(type)); |
| 98 } | 107 } |
| 99 } | 108 } |
| OLD | NEW |