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

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

Issue 2279973002: Converted Observatory heap-map element (Closed)
Patch Set: Fixed 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/elements.html ('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 945137e3ede53109ae651192356fe894747d7a0e..adc503716adc172a14e8951ff37c3e4d014f16ef 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -399,19 +399,26 @@ class PersistentHandlesPage extends SimplePage {
}
}
-class HeapMapPage extends SimplePage {
- HeapMapPage(app) : super('heap-map', 'heap-map', app);
+class HeapMapPage extends MatchingPage {
+ HeapMapPage(app) : super('heap-map', app);
+
+ final DivElement container = new DivElement();
void _visit(Uri uri) {
super._visit(uri);
getIsolate(uri).then((isolate) {
- if (element != null) {
- /// Update the page.
- HeapMapElement page = element;
- page.isolate = isolate;
- }
+ container.children = [
+ new HeapMapElement(isolate.vm, isolate, app.events, app.notifications,
+ queue: app.queue)
+ ];
});
}
+
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ }
}
class HeapSnapshotPage extends MatchingPage {
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698