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

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

Issue 2304463002: Converted Observatory vm-view && isolate-view elements (Closed)
Patch Set: Fixed typo 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
« no previous file with comments | « runtime/observatory/lib/src/app/event.dart ('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 d814421038d281da37362a683734572de639951f..b2d7e76ef50efb9660573498011b7d56a5ffdbab 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -16,6 +16,7 @@ final _heapSnapshotRepository = new HeapSnapshotRepository();
final _icdataRepository = new ICDataRepository();
final _inboundReferencesRepository = new InboundReferencesRepository();
final _instanceRepository = new InstanceRepository();
+final _isolateRepository = new IsolateRepository();
final _isolateSampleProfileRepository = new IsolateSampleProfileRepository();
final _libraryRepository = new LibraryRepository();
final _megamorphicCacheRepository = new MegamorphicCacheRepository();
@@ -137,16 +138,26 @@ class ErrorPage extends Page {
}
/// Top-level vm info page.
-class VMPage extends SimplePage {
- VMPage(app) : super('vm', 'vm-view', app);
+class VMPage extends MatchingPage {
+ VMPage(app) : super('vm', app);
+
+ final DivElement container = new DivElement();
+
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ assert(element != null);
+ }
void _visit(Uri uri) {
super._visit(uri);
- app.vm.reload().then((vm) {
- if (element != null) {
- VMViewElement serviceElement = element;
- serviceElement.vm = vm;
- }
+ app.vm.reload().then((VM vm) {
+ container.children = [
+ new VMViewElement(vm, app.events, app.notifications,
+ _isolateRepository, _scriptRepository,
+ queue: app.queue)
+ ];
}).catchError((e, stack) {
Logger.root.severe('VMPage visit error: $e');
// Reroute to vm-connect.
@@ -163,7 +174,8 @@ class FlagsPage extends SimplePage {
element = new FlagListElement(app.vm,
app.events,
new FlagsRepository(app.vm),
- app.notifications);
+ app.notifications,
+ queue: app.queue);
}
void _visit(Uri uri) {
@@ -263,6 +275,18 @@ class InspectPage extends MatchingPage {
_functionRepository,
queue: app.queue)
];
+ } else if (obj is Isolate) {
+ container.children = [
+ new IsolateViewElement(app.vm, obj, app.events,
+ app.notifications,
+ _isolateRepository,
+ _scriptRepository,
+ _functionRepository,
+ _libraryRepository,
+ _instanceRepository,
+ _evalRepository,
+ queue: app.queue)
+ ];
} else if (obj is ServiceFunction) {
container.children = [
new FunctionViewElement(app.vm, obj.isolate, obj, app.events,
« no previous file with comments | « runtime/observatory/lib/src/app/event.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