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

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

Issue 2299893003: Converted Observatory logging-page element (Closed)
Patch Set: Updated observatory_sources.gypi Created 4 years, 3 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
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)
+ ];
});
}
}
« no previous file with comments | « runtime/observatory/lib/src/app/application.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