| 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 extends Observable { | 9 class ObservatoryApplication extends Observable { |
| 10 static ObservatoryApplication app; | 10 static ObservatoryApplication app; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // vm.reload(); | 68 // vm.reload(); |
| 69 break; | 69 break; |
| 70 | 70 |
| 71 case 'IsolateShutdown': | 71 case 'IsolateShutdown': |
| 72 // TODO(turnidge): Should we show the user isolate shutdown events? | 72 // TODO(turnidge): Should we show the user isolate shutdown events? |
| 73 // What if there are hundreds of them? Coalesce multiple | 73 // What if there are hundreds of them? Coalesce multiple |
| 74 // shutdown events into one notification? | 74 // shutdown events into one notification? |
| 75 removePauseEvents(event.isolate); | 75 removePauseEvents(event.isolate); |
| 76 // vm.reload(); | 76 // vm.reload(); |
| 77 break; | 77 break; |
| 78 | 78 |
| 79 case 'BreakpointResolved': | 79 case 'BreakpointResolved': |
| 80 event.isolate.reloadBreakpoints(); | 80 event.isolate.reloadBreakpoints(); |
| 81 break; | 81 break; |
| 82 | 82 |
| 83 case 'BreakpointReached': | 83 case 'BreakpointReached': |
| 84 case 'IsolateInterrupted': | 84 case 'IsolateInterrupted': |
| 85 case 'ExceptionThrown': | 85 case 'ExceptionThrown': |
| 86 removePauseEvents(event.isolate); | 86 removePauseEvents(event.isolate); |
| 87 notifications.add(event); | 87 notifications.add(event); |
| 88 break; | 88 break; |
| 89 | 89 |
| 90 default: | 90 default: |
| 91 // Ignore unrecognized events. | 91 // Ignore unrecognized events. |
| 92 Logger.root.severe('Unrecognized event type: ${event.eventType}'); | 92 Logger.root.severe('Unrecognized event type: ${event.eventType}'); |
| 93 break; | 93 break; |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 void _registerPages() { | 97 void _registerPages() { |
| 98 // Register ClassTreePage. | 98 // Register ClassTreePage. |
| 99 _pageRegistry.add(new ClassTreePage(this)); | 99 _pageRegistry.add(new ClassTreePage(this)); |
| 100 _pageRegistry.add(new VMConnectPage(this)); | 100 _pageRegistry.add(new VMConnectPage(this)); |
| 101 _pageRegistry.add(new ErrorViewPage(this)); | 101 _pageRegistry.add(new ErrorViewPage(this)); |
| 102 _pageRegistry.add(new MetricsPage(this)); |
| 102 // Note that ServiceObjectPage must be the last entry in the list as it is | 103 // Note that ServiceObjectPage must be the last entry in the list as it is |
| 103 // the catch all. | 104 // the catch all. |
| 104 _pageRegistry.add(new ServiceObjectPage(this)); | 105 _pageRegistry.add(new ServiceObjectPage(this)); |
| 105 } | 106 } |
| 106 | 107 |
| 107 void _onError(ServiceError error) { | 108 void _onError(ServiceError error) { |
| 108 lastErrorOrException = error; | 109 lastErrorOrException = error; |
| 109 _visit('error/', null); | 110 _visit('error/', null); |
| 110 } | 111 } |
| 111 | 112 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 205 |
| 205 _vmDisconnected(VM vm) { | 206 _vmDisconnected(VM vm) { |
| 206 if (this.vm != vm) { | 207 if (this.vm != vm) { |
| 207 // This disconnect event occured *after* a new VM was installed. | 208 // This disconnect event occured *after* a new VM was installed. |
| 208 return; | 209 return; |
| 209 } | 210 } |
| 210 this.vm = null; | 211 this.vm = null; |
| 211 locationManager.go(locationManager.makeLink('/vm-connect/')); | 212 locationManager.go(locationManager.makeLink('/vm-connect/')); |
| 212 } | 213 } |
| 213 } | 214 } |
| OLD | NEW |