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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/app/location_manager.dart

Issue 197873028: Implement isolate view page. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: tweak html / gen js Created 6 years, 9 months 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 | Annotate | Revision Log
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 LocationManager class observes and parses the hash ('#') portion of the 7 /// The LocationManager class observes and parses the hash ('#') portion of the
8 /// URL in window.location. The text after the '#' is used as the request 8 /// URL in window.location. The text after the '#' is used as the request
9 /// string for the VM service. 9 /// string for the VM service.
10 class LocationManager extends Observable { 10 class LocationManager extends Observable {
11 static const String defaultHash = '#/isolates/'; 11 static const String defaultHash = '#/isolates/';
12 static final RegExp _currentIsolateMatcher = new RegExp(r'#/isolates/\d+'); 12 static final RegExp _currentIsolateMatcher = new RegExp(r'#/isolates/\d+');
13 static final RegExp _currentObjectMatcher = new RegExp(r'#/isolates/\d+/'); 13 static final RegExp _currentObjectMatcher = new RegExp(r'#/isolates/\d+(/|$)') ;
14 ObservatoryApplication _app; 14 ObservatoryApplication _app;
15 @observable String currentHash = ''; 15 @observable String currentHash = '';
16 16
17 void init() { 17 void init() {
18 window.onHashChange.listen((event) { 18 window.onHashChange.listen((event) {
19 if (setDefaultHash()) { 19 if (setDefaultHash()) {
20 // We just triggered another onHashChange event. 20 // We just triggered another onHashChange event.
21 return; 21 return;
22 } 22 }
23 // Request the current anchor. 23 // Request the current anchor.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (_app.isolate == null) { 80 if (_app.isolate == null) {
81 // No current isolate, refresh the isolate list. 81 // No current isolate, refresh the isolate list.
82 _app.vm.isolates.reload().then(_setResponse); 82 _app.vm.isolates.reload().then(_setResponse);
83 return; 83 return;
84 } 84 }
85 // Have a current isolate, request object. 85 // Have a current isolate, request object.
86 var objectId = currentIsolateObjectId(); 86 var objectId = currentIsolateObjectId();
87 _app.isolate.get(objectId).then(_setResponse); 87 _app.isolate.get(objectId).then(_setResponse);
88 } 88 }
89 } 89 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/lib/elements.html ('k') | runtime/bin/vmservice/client/lib/src/elements/isolate_ref.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698