OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |