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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 getIsolate(uri).then((isolate) { | 192 getIsolate(uri).then((isolate) { |
193 if (element != null) { | 193 if (element != null) { |
194 /// Update the page. | 194 /// Update the page. |
195 DebuggerPageElement page = element; | 195 DebuggerPageElement page = element; |
196 page.isolate = isolate; | 196 page.isolate = isolate; |
197 } | 197 } |
198 }); | 198 }); |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
| 202 |
| 203 class ObjectStorePage extends SimplePage { |
| 204 ObjectStorePage(app) : super('object-store', 'objectstore-view', app); |
| 205 |
| 206 void _visit(Uri uri) { |
| 207 super._visit(uri); |
| 208 getIsolate(uri).then((isolate) { |
| 209 isolate.getObjectStore().then((objectStore) { |
| 210 if (element != null) { |
| 211 /// Update the page. |
| 212 ObjectStoreView page = element; |
| 213 page.objectStore = objectStore; |
| 214 } |
| 215 }); |
| 216 }); |
| 217 } |
| 218 } |
| 219 |
202 class CpuProfilerPage extends SimplePage { | 220 class CpuProfilerPage extends SimplePage { |
203 CpuProfilerPage(app) : super('profiler', 'cpu-profile', app); | 221 CpuProfilerPage(app) : super('profiler', 'cpu-profile', app); |
204 | 222 |
205 void _visit(Uri uri) { | 223 void _visit(Uri uri) { |
206 super._visit(uri); | 224 super._visit(uri); |
207 getIsolate(uri).then((isolate) { | 225 getIsolate(uri).then((isolate) { |
208 if (element != null) { | 226 if (element != null) { |
209 /// Update the page. | 227 /// Update the page. |
210 CpuProfileElement page = element; | 228 CpuProfileElement page = element; |
211 page.isolate = isolate; | 229 page.isolate = isolate; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 assert(element != null); | 471 assert(element != null); |
454 } | 472 } |
455 | 473 |
456 void _visit(Uri uri) { | 474 void _visit(Uri uri) { |
457 assert(element != null); | 475 assert(element != null); |
458 assert(canVisit(uri)); | 476 assert(canVisit(uri)); |
459 } | 477 } |
460 | 478 |
461 bool canVisit(Uri uri) => uri.path == 'timeline'; | 479 bool canVisit(Uri uri) => uri.path == 'timeline'; |
462 } | 480 } |
OLD | NEW |