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

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

Issue 1406413006: Timeline service protocol support with Observatory UI (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 void _visit(Uri uri) { 418 void _visit(Uri uri) {
419 assert(element != null); 419 assert(element != null);
420 assert(canVisit(uri)); 420 assert(canVisit(uri));
421 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) { 421 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) {
422 (element as MetricsPageElement).isolate = i; 422 (element as MetricsPageElement).isolate = i;
423 }); 423 });
424 } 424 }
425 425
426 bool canVisit(Uri uri) => uri.path == 'metrics'; 426 bool canVisit(Uri uri) => uri.path == 'metrics';
427 } 427 }
428
429 class TimelinePage extends Page {
430 TimelinePage(app) : super(app);
431
432 void onInstall() {
433 if (element == null) {
434 element = new Element.tag('timeline-page');
435 }
436 assert(element != null);
437 }
438
439 void _visit(Uri uri) {
440 assert(element != null);
441 assert(canVisit(uri));
442 }
443
444 bool canVisit(Uri uri) => uri.path == 'timeline';
445 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/elements/timeline_page.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698