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

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

Issue 2202973002: Converted Observatory isolate-reconnect element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed typo Created 4 years, 4 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
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/page.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 class LocationManager extends Observable { 7 class LocationManager extends Observable {
8 final _defaultPath = '/vm'; 8 final _defaultPath = '/vm';
9 9
10 final ObservatoryApplication _app; 10 final ObservatoryApplication _app;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 /// Notify the current page that something has changed. 92 /// Notify the current page that something has changed.
93 _visit() { 93 _visit() {
94 runZoned(() => _app._visit(_uri, internalArguments), 94 runZoned(() => _app._visit(_uri, internalArguments),
95 onError: (e, st) { 95 onError: (e, st) {
96 if (e is IsolateNotFound) { 96 if (e is IsolateNotFound) {
97 var newPath = ((_app.vm == null || _app.vm.isDisconnected) 97 var newPath = ((_app.vm == null || _app.vm.isDisconnected)
98 ? '/vm-connect' : '/isolate-reconnect'); 98 ? '/vm-connect' : '/isolate-reconnect');
99 var parameters = {}; 99 var parameters = {};
100 parameters.addAll(_uri.queryParameters); 100 parameters.addAll(_uri.queryParameters);
101 parameters['originalPath'] = _uri.path; 101 parameters['originalUri'] = _uri.toString();
102 parameters['originalIsolateId'] = parameters['isolateId']; 102 parameters['isolateId'] = parameters['isolateId'];
103 var generatedUri = new Uri(path: newPath, queryParameters: parameters); 103 var generatedUri = new Uri(path: newPath, queryParameters: parameters);
104 go(makeLink(generatedUri.toString()), true); 104 go(makeLink(generatedUri.toString()), true);
105 return; 105 return;
106 } 106 }
107 // Surface any uncaught exceptions. 107 // Surface any uncaught exceptions.
108 _app.handleException(e, st); 108 _app.handleException(e, st);
109 }); 109 });
110 } 110 }
111 111
112 /// Navigate to [url]. 112 /// Navigate to [url].
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // let browser handle. 167 // let browser handle.
168 return; 168 return;
169 } 169 }
170 event.preventDefault(); 170 event.preventDefault();
171 // 'currentTarget' is the dom element that would process the event. 171 // 'currentTarget' is the dom element that would process the event.
172 // If we use 'target' we might get an <em> element or somesuch. 172 // If we use 'target' we might get an <em> element or somesuch.
173 var target = event.currentTarget; 173 var target = event.currentTarget;
174 go(target.attributes['href']); 174 go(target.attributes['href']);
175 } 175 }
176 } 176 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/page.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698