| 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 final _allocationProfileRepository = new AllocationProfileRepository(); | 7 final _allocationProfileRepository = new AllocationProfileRepository(); |
| 8 final _breakpointRepository = new BreakpointRepository(); | 8 final _breakpointRepository = new BreakpointRepository(); |
| 9 final _classSampleProfileRepository = new ClassSampleProfileRepository(); | 9 final _classSampleProfileRepository = new ClassSampleProfileRepository(); |
| 10 final _classRepository = new ClassRepository(); | 10 final _classRepository = new ClassRepository(); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 new ClassTreeElement(app.vm, | 427 new ClassTreeElement(app.vm, |
| 428 isolate, | 428 isolate, |
| 429 app.events, | 429 app.events, |
| 430 app.notifications, | 430 app.notifications, |
| 431 _classRepository) | 431 _classRepository) |
| 432 ]; | 432 ]; |
| 433 }); | 433 }); |
| 434 } | 434 } |
| 435 } | 435 } |
| 436 | 436 |
| 437 class DebuggerPage extends SimplePage { | 437 class DebuggerPage extends MatchingPage { |
| 438 DebuggerPage(app) : super('debugger', 'debugger-page', app); | 438 DebuggerPage(app) : super('debugger', app); |
| 439 |
| 440 final DivElement container = new DivElement(); |
| 439 | 441 |
| 440 void _visit(Uri uri) { | 442 void _visit(Uri uri) { |
| 441 super._visit(uri); | 443 super._visit(uri); |
| 442 getIsolate(uri).then((isolate) { | 444 getIsolate(uri).then((isolate) async { |
| 443 if (element != null) { | 445 container.children = [ |
| 444 /// Update the page. | 446 new DebuggerPageElement(isolate, _instanceRepository, |
| 445 DebuggerPageElement page = element; | 447 _scriptRepository, app.events) |
| 446 page.isolate = isolate; | 448 ]; |
| 447 } | |
| 448 }); | 449 }); |
| 449 } | 450 } |
| 451 |
| 452 void onInstall() { |
| 453 if (element == null) { |
| 454 element = container; |
| 455 } |
| 456 assert(element != null); |
| 457 } |
| 458 |
| 459 @override |
| 460 void onUninstall() { |
| 461 assert(element != null); |
| 462 element.children = const []; |
| 463 } |
| 450 } | 464 } |
| 451 | 465 |
| 452 class ObjectStorePage extends MatchingPage { | 466 class ObjectStorePage extends MatchingPage { |
| 453 ObjectStorePage(app) : super('object-store', app); | 467 ObjectStorePage(app) : super('object-store', app); |
| 454 | 468 |
| 455 final DivElement container = new DivElement(); | 469 final DivElement container = new DivElement(); |
| 456 | 470 |
| 457 void _visit(Uri uri) { | 471 void _visit(Uri uri) { |
| 458 super._visit(uri); | 472 super._visit(uri); |
| 459 getIsolate(uri).then((isolate) async { | 473 getIsolate(uri).then((isolate) async { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 element = new TimelinePageElement(app.vm, app.events, app.notifications, | 791 element = new TimelinePageElement(app.vm, app.events, app.notifications, |
| 778 queue: app.queue); | 792 queue: app.queue); |
| 779 } | 793 } |
| 780 | 794 |
| 781 void _visit(Uri uri) { | 795 void _visit(Uri uri) { |
| 782 assert(canVisit(uri)); | 796 assert(canVisit(uri)); |
| 783 } | 797 } |
| 784 | 798 |
| 785 bool canVisit(Uri uri) => uri.path == 'timeline'; | 799 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 786 } | 800 } |
| OLD | NEW |