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