| 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 1d3c55b2c6857ec203e448f4476d8f91ee6cd526..1e04b6c75a1cc15b516bcb5a16130d870ac12a2e 100644
|
| --- a/runtime/observatory/lib/src/app/page.dart
|
| +++ b/runtime/observatory/lib/src/app/page.dart
|
| @@ -105,6 +105,14 @@ abstract class MatchingPage extends Page {
|
| });
|
| }
|
|
|
| + EditorRepository getEditor(Uri uri) {
|
| + var editor = uri.queryParameters['editor'];
|
| + if (editor != null) {
|
| + return new EditorRepository(editor);
|
| + }
|
| + return null;
|
| + }
|
| +
|
| bool canVisit(Uri uri) => uri.path == path;
|
| }
|
|
|
| @@ -685,6 +693,37 @@ class AllocationProfilerPage extends MatchingPage {
|
| }
|
| }
|
|
|
| +class MemoryDashboardPage extends MatchingPage {
|
| + MemoryDashboardPage(app) : super('memory-dashboard', app);
|
| +
|
| + final DivElement container = new DivElement();
|
| +
|
| + void _visit(Uri uri) {
|
| + super._visit(uri);
|
| + getIsolate(uri).then((isolate) {
|
| + container.children = [
|
| + new MemoryDashboardElement(isolate.vm, isolate, app.events,
|
| + app.notifications, _allocationProfileRepository, getEditor(uri),
|
| + queue: app.queue)
|
| + ];
|
| + });
|
| + }
|
| +
|
| + void onInstall() {
|
| + if (element == null) {
|
| + element = container;
|
| + }
|
| + app.startGCEventListener();
|
| + }
|
| +
|
| + @override
|
| + void onUninstall() {
|
| + super.onUninstall();
|
| + app.stopGCEventListener();
|
| + container.children = const [];
|
| + }
|
| +}
|
| +
|
| class PortsPage extends MatchingPage {
|
| PortsPage(app) : super('ports', app);
|
|
|
|
|