Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: runtime/observatory/lib/src/app/application.dart

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)
Patch Set: CHANGELOG.md merge and fatal error Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/lib/developer.dart ('k') | runtime/observatory/lib/src/elements/vm_connect.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « runtime/lib/developer.dart ('k') | runtime/observatory/lib/src/elements/vm_connect.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698