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

Unified Diff: runtime/observatory/lib/src/elements/isolate_reconnect.dart

Issue 1072423003: When attempting to navigate to a page for an isolate that doesn't exist, offer to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/isolate_reconnect.dart
diff --git a/runtime/observatory/lib/src/elements/isolate_reconnect.dart b/runtime/observatory/lib/src/elements/isolate_reconnect.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3de1078c41b135a2c291be1950e70c7e3472c40b
--- /dev/null
+++ b/runtime/observatory/lib/src/elements/isolate_reconnect.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library isolate_reconnect_element;
+
+import 'dart:html';
+import 'package:polymer/polymer.dart';
+import 'observatory_element.dart';
+import 'package:observatory/app.dart';
+import 'package:observatory/service_html.dart';
+
+@CustomTag('isolate-reconnect')
+class IsolateReconnectElement extends ObservatoryElement {
+ IsolateReconnectElement.created() : super.created();
+
+ get missingIsolateId {
+ return app.locationManager.uri.queryParameters['originalIsolateId'];
+ }
+
+ linkToContinueIn(isolate) {
+ var parameters = new Map.from(app.locationManager.uri.queryParameters);
+ parameters['isolateId'] = isolate.id;
+ parameters.remove('originalIsolateId');
+ var path = parameters.remove('originalPath');
+ path = "/$path";
+ var generatedUri = new Uri(path: path, queryParameters: parameters);
+ return app.locationManager.makeLink(generatedUri.toString());
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698