| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of app; | 5 part of app; |
| 6 | 6 |
| 7 class IsolateNotFound implements Exception { | 7 class IsolateNotFound implements Exception { |
| 8 String isolateId; | 8 String isolateId; |
| 9 IsolateNotFound(this.isolateId); | 9 IsolateNotFound(this.isolateId); |
| 10 String toString() => "IsolateNotFound: $isolateId"; | 10 String toString() => "IsolateNotFound: $isolateId"; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 serviceElement.object = obj; | 155 serviceElement.object = obj; |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 | 160 |
| 161 /// Class tree page. | 161 /// Class tree page. |
| 162 class ClassTreePage extends SimplePage { | 162 class ClassTreePage extends SimplePage { |
| 163 ClassTreePage(app) : super('class-tree', 'class-tree', app); | 163 ClassTreePage(app) : super('class-tree', 'class-tree', app); |
| 164 | 164 |
| 165 final DivElement container = new DivElement(); |
| 166 |
| 167 @override |
| 168 void onInstall() { |
| 169 element = container; |
| 170 } |
| 171 |
| 165 void _visit(Uri uri) { | 172 void _visit(Uri uri) { |
| 166 super._visit(uri); | 173 super._visit(uri); |
| 167 getIsolate(uri).then((isolate) { | 174 getIsolate(uri).then((isolate) { |
| 168 if (element != null) { | 175 container.children = [ |
| 169 /// Update the page. | 176 new ClassTreeElement(app.vm, |
| 170 ClassTreeElement page = element; | 177 isolate, |
| 171 page.isolate = isolate; | 178 app.events, |
| 172 } | 179 app.notifications, |
| 180 new ClassRepository(isolate)) |
| 181 ]; |
| 173 }); | 182 }); |
| 174 } | 183 } |
| 175 } | 184 } |
| 176 | 185 |
| 177 class DebuggerPage extends SimplePage { | 186 class DebuggerPage extends SimplePage { |
| 178 DebuggerPage(app) : super('debugger', 'debugger-page', app); | 187 DebuggerPage(app) : super('debugger', 'debugger-page', app); |
| 179 | 188 |
| 180 void _visit(Uri uri) { | 189 void _visit(Uri uri) { |
| 181 super._visit(uri); | 190 super._visit(uri); |
| 182 getIsolate(uri).then((isolate) { | 191 getIsolate(uri).then((isolate) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 assert(element != null); | 474 assert(element != null); |
| 466 } | 475 } |
| 467 | 476 |
| 468 void _visit(Uri uri) { | 477 void _visit(Uri uri) { |
| 469 assert(element != null); | 478 assert(element != null); |
| 470 assert(canVisit(uri)); | 479 assert(canVisit(uri)); |
| 471 } | 480 } |
| 472 | 481 |
| 473 bool canVisit(Uri uri) => uri.path == 'timeline'; | 482 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 474 } | 483 } |
| OLD | NEW |