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 part of app; | 5 part of app; |
6 | 6 |
7 /// The observatory application. Instances of this are created and owned | 7 /// The observatory application. Instances of this are created and owned |
8 /// by the observatory_application custom element. | 8 /// by the observatory_application custom element. |
9 class ObservatoryApplication { | 9 class ObservatoryApplication { |
10 static ObservatoryApplication app; | 10 static ObservatoryApplication app; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return; | 232 return; |
233 } | 233 } |
234 if (targets.current == null) { | 234 if (targets.current == null) { |
235 _switchVM(null); | 235 _switchVM(null); |
236 } | 236 } |
237 final bool currentTarget = | 237 final bool currentTarget = |
238 (_vm as WebSocketVM)?.target == targets.current; | 238 (_vm as WebSocketVM)?.target == targets.current; |
239 final bool currentTargetConnected = (_vm != null) && !_vm.isDisconnected; | 239 final bool currentTargetConnected = (_vm != null) && !_vm.isDisconnected; |
240 if (!currentTarget || !currentTargetConnected) { | 240 if (!currentTarget || !currentTargetConnected) { |
241 _switchVM(new WebSocketVM(targets.current)); | 241 _switchVM(new WebSocketVM(targets.current)); |
| 242 app.locationManager.go(Uris.vm()); |
242 } | 243 } |
243 }); | 244 }); |
244 | 245 |
245 Logger.root.info('Setting initial target to ${targets.current.name}'); | 246 Logger.root.info('Setting initial target to ${targets.current.name}'); |
246 _switchVM(new WebSocketVM(targets.current)); | 247 _switchVM(new WebSocketVM(targets.current)); |
247 _initOnce(); | 248 _initOnce(); |
248 | 249 |
249 // delete pause events. | 250 // delete pause events. |
250 events.onIsolateExit.listen(_deletePauseEvents); | 251 events.onIsolateExit.listen(_deletePauseEvents); |
251 events.onResume.listen(_deletePauseEvents); | 252 events.onResume.listen(_deletePauseEvents); |
(...skipping 27 matching lines...) Expand all Loading... |
279 } | 280 } |
280 | 281 |
281 // TODO(turnidge): Report this failure via analytics. | 282 // TODO(turnidge): Report this failure via analytics. |
282 Logger.root.warning('Caught exception: ${e}\n${st}'); | 283 Logger.root.warning('Caught exception: ${e}\n${st}'); |
283 notifications.add(new ExceptionNotification(e, stacktrace: st)); | 284 notifications.add(new ExceptionNotification(e, stacktrace: st)); |
284 } | 285 } |
285 | 286 |
286 // This map keeps track of which curly-blocks have been expanded by the user. | 287 // This map keeps track of which curly-blocks have been expanded by the user. |
287 Map<String, bool> expansions = {}; | 288 Map<String, bool> expansions = {}; |
288 } | 289 } |
OLD | NEW |