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 c2eb89b943fbd9fdfb7faa667e2b8cb2de8fe6de..4130dda43cdd542bef0cee64429b9d777f14e691 100644 |
--- a/runtime/observatory/lib/src/app/page.dart |
+++ b/runtime/observatory/lib/src/app/page.dart |
@@ -644,18 +644,31 @@ class HeapSnapshotPage extends MatchingPage { |
} |
} |
+class LoggingPage extends MatchingPage { |
+ LoggingPage(app) : super('logging', app); |
-class LoggingPage extends SimplePage { |
- LoggingPage(app) : super('logging', 'logging-page', app); |
+ final DivElement container = new DivElement(); |
+ |
+ @override |
+ void onInstall() { |
+ element = container; |
+ container.children = const []; |
+ app.startLoggingEventListener(); |
+ } |
+ |
+ @override |
+ void onUninstall() { |
+ app.stopLoggingEventListener(); |
+ } |
void _visit(Uri uri) { |
- super._visit(uri); |
+ assert(element != null); |
+ assert(canVisit(uri)); |
getIsolate(uri).then((isolate) { |
- if (element != null) { |
- /// Update the page. |
- LoggingPageElement page = element; |
- page.isolate = isolate; |
- } |
+ container.children = [ |
+ new LoggingPageElement(app.vm, isolate, app.events, |
+ app.notifications, queue: app.queue) |
+ ]; |
}); |
} |
} |