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

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

Issue 2270013002: Converted Observatory context-view element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed access to instance function 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/repositories.dart ('k') | runtime/observatory/lib/src/elements/context_view.dart » ('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 cb409a98dfd6f3372cf641c23e295e09ceda2427..182eae4469978933dd92af29dd8f28f9bfe66f5e 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -6,8 +6,11 @@ part of app;
AllocationProfileRepository _allocationProfileRepository
= new AllocationProfileRepository();
+ContextRepository _contextRepository = new ContextRepository();
HeapSnapshotRepository _heapSnapshotRepository
= new HeapSnapshotRepository();
+InboundReferencesRepository _inboundReferencesRepository
+ = new InboundReferencesRepository();
InstanceRepository _instanceRepository = new InstanceRepository();
IsolateSampleProfileRepository _isolateSampleProfileRepository
= new IsolateSampleProfileRepository();
@@ -18,6 +21,11 @@ class IsolateNotFound implements Exception {
IsolateNotFound(this.isolateId);
String toString() => "IsolateNotFound: $isolateId";
}
+RetainedSizeRepository _retainedSizeRepository = new RetainedSizeRepository();
+ReachableSizeRepository _reachableSizeRepository
+ = new ReachableSizeRepository();
+RetainingPathRepository _retainingPathRepository
+ = new RetainingPathRepository();
/// A [Page] controls the user interface of Observatory. At any given time
/// one page will be the current page. Pages are registered at startup.
@@ -148,8 +156,10 @@ class FlagsPage extends SimplePage {
}
}
-class InspectPage extends SimplePage {
- InspectPage(app) : super('inspect', 'service-view', app);
+class InspectPage extends MatchingPage {
+ InspectPage(app) : super('inspect', app);
+
+ DivElement container = new DivElement();
void _visit(Uri uri) {
super._visit(uri);
@@ -163,10 +173,30 @@ class InspectPage extends SimplePage {
});
}
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ assert(element != null);
+ }
+
void _visitObject(obj) {
- if (element != null) {
- ServiceObjectViewElement serviceElement = element;
+ if (obj is Context) {
+ container.children = [
+ new ContextViewElement(app.vm, obj.isolate, obj, app.events,
+ app.notifications,
+ _contextRepository,
+ _retainedSizeRepository,
+ _reachableSizeRepository,
+ _inboundReferencesRepository,
+ _retainingPathRepository,
+ _instanceRepository,
+ queue: app.queue)
+ ];
+ } else {
+ ServiceObjectViewElement serviceElement =new Element.tag('service-view');
serviceElement.object = obj;
+ container.children = [serviceElement];
}
}
}
« no previous file with comments | « runtime/observatory/lib/repositories.dart ('k') | runtime/observatory/lib/src/elements/context_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698