OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 library isolate_reconnect_element; |
| 6 |
| 7 import 'dart:html'; |
| 8 import 'package:polymer/polymer.dart'; |
| 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; |
| 11 import 'package:observatory/service_html.dart'; |
| 12 |
| 13 @CustomTag('isolate-reconnect') |
| 14 class IsolateReconnectElement extends ObservatoryElement { |
| 15 IsolateReconnectElement.created() : super.created(); |
| 16 |
| 17 get missingIsolateId { |
| 18 return app.locationManager.uri.queryParameters['originalIsolateId']; |
| 19 } |
| 20 |
| 21 linkToContinueIn(isolate) { |
| 22 var parameters = new Map.from(app.locationManager.uri.queryParameters); |
| 23 parameters['isolateId'] = isolate.id; |
| 24 parameters.remove('originalIsolateId'); |
| 25 var path = parameters.remove('originalPath'); |
| 26 path = "/$path"; |
| 27 var generatedUri = new Uri(path: path, queryParameters: parameters); |
| 28 return app.locationManager.makeLink(generatedUri.toString()); |
| 29 } |
| 30 } |
OLD | NEW |