| 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 nav_bar_element; | 5 library nav_bar_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 @published bool last = false; | 76 @published bool last = false; |
| 77 | 77 |
| 78 TopNavMenuElement.created() : super.created(); | 78 TopNavMenuElement.created() : super.created(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 @CustomTag('isolate-nav-menu') | 81 @CustomTag('isolate-nav-menu') |
| 82 class IsolateNavMenuElement extends ObservatoryElement { | 82 class IsolateNavMenuElement extends ObservatoryElement { |
| 83 @published bool last = false; | 83 @published bool last = false; |
| 84 @published Isolate isolate; | 84 @published Isolate isolate; |
| 85 | 85 |
| 86 void isolateChanged(oldValue) { | |
| 87 notifyPropertyChange(#hashLinkWorkaround, 0, 1); | |
| 88 } | |
| 89 | |
| 90 // TODO(turnidge): Figure out why polymer needs this function. | |
| 91 @reflectable | |
| 92 String get hashLinkWorkaround { | |
| 93 if (isolate != null) { | |
| 94 return isolate.link; | |
| 95 } else { | |
| 96 return ''; | |
| 97 } | |
| 98 } | |
| 99 @reflectable set hashLinkWorkaround(var x) { /* silence polymer */ } | |
| 100 | |
| 101 IsolateNavMenuElement.created() : super.created(); | 86 IsolateNavMenuElement.created() : super.created(); |
| 102 } | 87 } |
| 103 | 88 |
| 104 @CustomTag('library-nav-menu') | 89 @CustomTag('library-nav-menu') |
| 105 class LibraryNavMenuElement extends ObservatoryElement { | 90 class LibraryNavMenuElement extends ObservatoryElement { |
| 106 @published Library library; | 91 @published Library library; |
| 107 @published bool last = false; | 92 @published bool last = false; |
| 108 | 93 |
| 109 LibraryNavMenuElement.created() : super.created(); | 94 LibraryNavMenuElement.created() : super.created(); |
| 110 } | 95 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 app.removePauseEvents(event.isolate); | 130 app.removePauseEvents(event.isolate); |
| 146 return event.isolate.stepOut(); | 131 return event.isolate.stepOut(); |
| 147 } | 132 } |
| 148 | 133 |
| 149 void closeItem(MouseEvent e, var detail, Element target) { | 134 void closeItem(MouseEvent e, var detail, Element target) { |
| 150 events.remove(event); | 135 events.remove(event); |
| 151 } | 136 } |
| 152 | 137 |
| 153 NavNotifyItemElement.created() : super.created(); | 138 NavNotifyItemElement.created() : super.created(); |
| 154 } | 139 } |
| OLD | NEW |