| 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 class Notification { | 7 class Notification { |
| 8 Notification.fromEvent(this.event); | 8 Notification.fromEvent(this.event); |
| 9 Notification.fromException(this.exception, this.stacktrace); | 9 Notification.fromException(this.exception, this.stacktrace); |
| 10 | 10 |
| 11 ServiceEvent event; | 11 ServiceEvent event; |
| 12 var exception; | 12 var exception; |
| 13 var stacktrace; | 13 var stacktrace; |
| 14 } | 14 } |
| 15 | 15 |
| 16 /// The observatory application. Instances of this are created and owned | 16 /// The observatory application. Instances of this are created and owned |
| 17 /// by the observatory_application custom element. | 17 /// by the observatory_application custom element. |
| 18 class ObservatoryApplication extends Observable { | 18 class ObservatoryApplication extends Observable { |
| 19 static ObservatoryApplication app; | 19 static ObservatoryApplication app; |
| 20 final RenderingQueue queue = new RenderingQueue(); |
| 20 final _pageRegistry = new List<Page>(); | 21 final _pageRegistry = new List<Page>(); |
| 21 LocationManager _locationManager; | 22 LocationManager _locationManager; |
| 22 LocationManager get locationManager => _locationManager; | 23 LocationManager get locationManager => _locationManager; |
| 23 @observable Page currentPage; | 24 @observable Page currentPage; |
| 24 VM _vm; | 25 VM _vm; |
| 25 VM get vm => _vm; | 26 VM get vm => _vm; |
| 26 | 27 |
| 27 set vm(VM vm) { | 28 set vm(VM vm) { |
| 28 if (_vm == vm) { | 29 if (_vm == vm) { |
| 29 // Do nothing. | 30 // Do nothing. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 242 } |
| 242 | 243 |
| 243 // TODO(turnidge): Report this failure via analytics. | 244 // TODO(turnidge): Report this failure via analytics. |
| 244 Logger.root.warning('Caught exception: ${e}\n${st}'); | 245 Logger.root.warning('Caught exception: ${e}\n${st}'); |
| 245 notifications.add(new Notification.fromException(e, st)); | 246 notifications.add(new Notification.fromException(e, st)); |
| 246 } | 247 } |
| 247 | 248 |
| 248 // This map keeps track of which curly-blocks have been expanded by the user. | 249 // This map keeps track of which curly-blocks have been expanded by the user. |
| 249 Map<String,bool> expansions = {}; | 250 Map<String,bool> expansions = {}; |
| 250 } | 251 } |
| OLD | NEW |