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 28 matching lines...) Expand all Loading... |
39 TraceViewElement _traceView = null; | 39 TraceViewElement _traceView = null; |
40 | 40 |
41 @reflectable ServiceObject lastErrorOrException; | 41 @reflectable ServiceObject lastErrorOrException; |
42 @observable ObservableList<ServiceEvent> notifications = | 42 @observable ObservableList<ServiceEvent> notifications = |
43 new ObservableList<ServiceEvent>(); | 43 new ObservableList<ServiceEvent>(); |
44 | 44 |
45 void _initOnce(bool chromium) { | 45 void _initOnce(bool chromium) { |
46 assert(app == null); | 46 assert(app == null); |
47 app = this; | 47 app = this; |
48 _registerPages(); | 48 _registerPages(); |
| 49 Analytics.initialize(); |
49 locationManager._init(this); | 50 locationManager._init(this); |
50 } | 51 } |
51 | 52 |
52 void removePauseEvents(Isolate isolate) { | 53 void removePauseEvents(Isolate isolate) { |
53 bool isPauseEvent(var event) { | 54 bool isPauseEvent(var event) { |
54 return (event.eventType == ServiceEvent.kPauseStart || | 55 return (event.eventType == ServiceEvent.kPauseStart || |
55 event.eventType == ServiceEvent.kPauseExit || | 56 event.eventType == ServiceEvent.kPauseExit || |
56 event.eventType == ServiceEvent.kPauseBreakpoint || | 57 event.eventType == ServiceEvent.kPauseBreakpoint || |
57 event.eventType == ServiceEvent.kPauseInterrupted || | 58 event.eventType == ServiceEvent.kPauseInterrupted || |
58 event.eventType == ServiceEvent.kPauseException); | 59 event.eventType == ServiceEvent.kPauseException); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 217 |
217 _vmDisconnected(VM vm) { | 218 _vmDisconnected(VM vm) { |
218 if (this.vm != vm) { | 219 if (this.vm != vm) { |
219 // This disconnect event occured *after* a new VM was installed. | 220 // This disconnect event occured *after* a new VM was installed. |
220 return; | 221 return; |
221 } | 222 } |
222 this.vm = null; | 223 this.vm = null; |
223 notifications.add(new ServiceEvent.vmDisconencted()); | 224 notifications.add(new ServiceEvent.vmDisconencted()); |
224 } | 225 } |
225 } | 226 } |
OLD | NEW |