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

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

Issue 1250853006: Logging page (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
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 part of app; 5 part of app;
6 6
7 class IsolateNotFound implements Exception { 7 class IsolateNotFound implements Exception {
8 String isolateId; 8 String isolateId;
9 IsolateNotFound(this.isolateId); 9 IsolateNotFound(this.isolateId);
10 String toString() => "IsolateNotFound: $isolateId"; 10 String toString() => "IsolateNotFound: $isolateId";
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 getIsolate(uri).then((isolate) { 287 getIsolate(uri).then((isolate) {
288 if (element != null) { 288 if (element != null) {
289 /// Update the page. 289 /// Update the page.
290 HeapSnapshotElement page = element; 290 HeapSnapshotElement page = element;
291 page.isolate = isolate; 291 page.isolate = isolate;
292 } 292 }
293 }); 293 });
294 } 294 }
295 } 295 }
296 296
297
298 class LoggingPage extends SimplePage {
299 LoggingPage(app) : super('logging', 'logging-page', app);
300
301 void _visit(Uri uri) {
302 super._visit(uri);
303 getIsolate(uri).then((isolate) {
304 if (element != null) {
305 /// Update the page.
306 LoggingPageElement page = element;
307 page.isolate = isolate;
308 }
309 });
310 }
311 }
312
297 class ErrorViewPage extends Page { 313 class ErrorViewPage extends Page {
298 ErrorViewPage(app) : super(app); 314 ErrorViewPage(app) : super(app);
299 315
300 void onInstall() { 316 void onInstall() {
301 if (element == null) { 317 if (element == null) {
302 /// Lazily create page. 318 /// Lazily create page.
303 element = new Element.tag('service-view'); 319 element = new Element.tag('service-view');
304 } 320 }
305 } 321 }
306 322
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 void _visit(Uri uri) { 418 void _visit(Uri uri) {
403 assert(element != null); 419 assert(element != null);
404 assert(canVisit(uri)); 420 assert(canVisit(uri));
405 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) { 421 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) {
406 (element as MetricsPageElement).isolate = i; 422 (element as MetricsPageElement).isolate = i;
407 }); 423 });
408 } 424 }
409 425
410 bool canVisit(Uri uri) => uri.path == 'metrics'; 426 bool canVisit(Uri uri) => uri.path == 'metrics';
411 } 427 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/elements/isolate_summary.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698