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

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

Issue 378113002: Improve script display in the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 observatory application. Instances of this are created and owned 7 /// The observatory application. Instances of this are created and owned
8 /// by the observatory_application custom element. 8 /// by the observatory_application custom element.
9 class ObservatoryApplication extends Observable { 9 class ObservatoryApplication extends Observable {
10 static ObservatoryApplication app; 10 static ObservatoryApplication app;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 lastErrorOrException = exception; 110 lastErrorOrException = exception;
111 if (exception.kind == 'NetworkException') { 111 if (exception.kind == 'NetworkException') {
112 // Got a network exception, visit the vm-connect pane. 112 // Got a network exception, visit the vm-connect pane.
113 locationManager.go(locationManager.makeLink('/vm-connect/')); 113 locationManager.go(locationManager.makeLink('/vm-connect/'));
114 } else { 114 } else {
115 _visit('error/', null); 115 _visit('error/', null);
116 } 116 }
117 } 117 }
118 118
119 void _visit(String url, String args) { 119 void _visit(String url, String args) {
120 // TODO(johnmccutchan): Pass [args] to pane. 120 var argsMap;
121 if (args == null) {
122 argsMap = {};
123 } else {
124 argsMap = Uri.splitQueryString(args);
125 }
121 for (var i = 0; i < _paneRegistry.length; i++) { 126 for (var i = 0; i < _paneRegistry.length; i++) {
122 var pane = _paneRegistry[i]; 127 var pane = _paneRegistry[i];
123 if (pane.canVisit(url)) { 128 if (pane.canVisit(url)) {
124 _installPane(pane); 129 _installPane(pane);
125 pane.visit(url); 130 pane.visit(url, argsMap);
126 return; 131 return;
127 } 132 }
128 } 133 }
129 throw new FallThroughError(); 134 throw new FallThroughError();
130 } 135 }
131 136
132 /// Set the Observatory application pane. 137 /// Set the Observatory application pane.
133 void _installPane(Pane pane) { 138 void _installPane(Pane pane) {
134 assert(pane != null); 139 assert(pane != null);
135 if (_currentPane == pane) { 140 if (_currentPane == pane) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 181
177 _vmDisconnected(VM vm) { 182 _vmDisconnected(VM vm) {
178 if (this.vm != vm) { 183 if (this.vm != vm) {
179 // This disconnect event occured *after* a new VM was installed. 184 // This disconnect event occured *after* a new VM was installed.
180 return; 185 return;
181 } 186 }
182 this.vm = null; 187 this.vm = null;
183 locationManager.go(locationManager.makeLink('/vm-connect/')); 188 locationManager.go(locationManager.makeLink('/vm-connect/'));
184 } 189 }
185 } 190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698