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

Side by Side Diff: runtime/observatory/lib/src/elements/vm_connect.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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 library vm_connect_element; 5 library vm_connect_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/app.dart'; 10 import 'package:observatory/app.dart';
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 @published String chromiumAddress = 'localhost:9222'; 61 @published String chromiumAddress = 'localhost:9222';
62 @observable ObservableList<WebSocketVMTarget> chromeTargets = 62 @observable ObservableList<WebSocketVMTarget> chromeTargets =
63 new ObservableList<WebSocketVMTarget>(); 63 new ObservableList<WebSocketVMTarget>();
64 64
65 VMConnectElement.created() : super.created() { 65 VMConnectElement.created() : super.created() {
66 pollPeriod = new Duration(seconds: 1); 66 pollPeriod = new Duration(seconds: 1);
67 } 67 }
68 68
69 void _connect(WebSocketVMTarget target) { 69 void _connect(WebSocketVMTarget target) {
70 _connectToVM(app, target); 70 _connectToVM(app, target);
71 app.locationManager.go('#/vm'); 71 app.locationManager.goForwardingParameters('/vm');
72 } 72 }
73 73
74 void onPoll() { 74 void onPoll() {
75 _refreshTabs(); 75 _refreshTabs();
76 } 76 }
77 77
78 String _normalizeStandaloneAddress(String networkAddress) { 78 String _normalizeStandaloneAddress(String networkAddress) {
79 if (networkAddress.startsWith('ws://')) { 79 if (networkAddress.startsWith('ws://')) {
80 return networkAddress; 80 return networkAddress;
81 } 81 }
(...skipping 26 matching lines...) Expand all
108 // This happens when a tab has devtools open! 108 // This happens when a tab has devtools open!
109 continue; 109 continue;
110 } 110 }
111 chromeTargets.add(targets[i]); 111 chromeTargets.add(targets[i]);
112 } 112 }
113 }).catchError((e) { 113 }).catchError((e) {
114 chromeTargets.clear(); 114 chromeTargets.clear();
115 }); 115 });
116 } 116 }
117 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698