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

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

Issue 2962593002: Added Editor stream and sendObjectToEditor RPC into Service Protocol (Closed)
Patch Set: Added explanation comment Created 3 years, 6 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 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);
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/cpu_profile/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698