| 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:html'; | 8 import 'dart:html'; |
| 8 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 9 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
| 10 import 'package:polymer/polymer.dart'; | 11 import 'package:polymer/polymer.dart'; |
| 11 | 12 |
| 12 | 13 |
| 13 @CustomTag('nav-bar') | 14 @CustomTag('nav-bar') |
| 14 class NavBarElement extends ObservatoryElement { | 15 class NavBarElement extends ObservatoryElement { |
| 15 @published bool pad = true; | 16 @published bool pad = true; |
| 16 | 17 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 @published ObservableList<ServiceEvent> events; | 122 @published ObservableList<ServiceEvent> events; |
| 122 | 123 |
| 123 NavNotifyElement.created() : super.created(); | 124 NavNotifyElement.created() : super.created(); |
| 124 } | 125 } |
| 125 | 126 |
| 126 @CustomTag('nav-notify-item') | 127 @CustomTag('nav-notify-item') |
| 127 class NavNotifyItemElement extends ObservatoryElement { | 128 class NavNotifyItemElement extends ObservatoryElement { |
| 128 @published ObservableList<ServiceEvent> events; | 129 @published ObservableList<ServiceEvent> events; |
| 129 @published ServiceEvent event; | 130 @published ServiceEvent event; |
| 130 | 131 |
| 132 Future resume(_) { |
| 133 app.removePauseEvents(event.isolate); |
| 134 return event.isolate.resume(); |
| 135 } |
| 136 Future stepInto(_) { |
| 137 app.removePauseEvents(event.isolate); |
| 138 return event.isolate.stepInto(); |
| 139 } |
| 140 Future stepOver(_) { |
| 141 app.removePauseEvents(event.isolate); |
| 142 return event.isolate.stepOver(); |
| 143 } |
| 144 Future stepOut(_) { |
| 145 app.removePauseEvents(event.isolate); |
| 146 return event.isolate.stepOut(); |
| 147 } |
| 148 |
| 131 void closeItem(MouseEvent e, var detail, Element target) { | 149 void closeItem(MouseEvent e, var detail, Element target) { |
| 132 events.remove(event); | 150 events.remove(event); |
| 133 } | 151 } |
| 134 | 152 |
| 135 NavNotifyItemElement.created() : super.created(); | 153 NavNotifyItemElement.created() : super.created(); |
| 136 } | 154 } |
| OLD | NEW |