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

Unified Diff: runtime/observatory/lib/src/app/page.dart

Issue 2213613002: Converted observatory flag-list element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added tests Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/lib/repositories.dart ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/app/page.dart
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index 365e227818c0e558cdc633ccb0129b7608ed82a7..980fcfa464d8bc242737913b122ffb386fec536c 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -101,14 +101,14 @@ class ErrorPage extends Page {
/// Top-level vm info page.
class VMPage extends SimplePage {
- VMPage(app) : super('vm', 'service-view', app);
+ VMPage(app) : super('vm', 'vm-view', app);
void _visit(Uri uri) {
super._visit(uri);
app.vm.reload().then((vm) {
if (element != null) {
- ServiceObjectViewElement serviceElement = element;
- serviceElement.object = vm;
+ VMViewElement serviceElement = element;
+ serviceElement.vm = vm;
}
}).catchError((e, stack) {
Logger.root.severe('VMPage visit error: $e');
@@ -121,16 +121,16 @@ class VMPage extends SimplePage {
class FlagsPage extends SimplePage {
FlagsPage(app) : super('flags', 'flag-list', app);
+ @override
+ onInstall() {
+ element = new FlagListElement(app.vm,
+ app.vm.changes.map((_) => new VMUpdateEventMock(vm: app.vm)),
+ new FlagsRepository(),
+ app.notifications);
+ }
+
void _visit(Uri uri) {
super._visit(uri);
- app.vm.getFlagList().then((flags) {
- if (element != null) {
- FlagListElement serviceElement = element;
- serviceElement.flagList = flags;
- }
- }).catchError((e, stack) {
- Logger.root.severe('FlagsPage visit error: $e\n$stack');
- });
}
}
« no previous file with comments | « runtime/observatory/lib/repositories.dart ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698