| Index: runtime/bin/vmservice/client/observatory/packages/observatory/src/observatory/application.dart
|
| diff --git a/runtime/bin/vmservice/client/observatory/packages/observatory/src/observatory/application.dart b/runtime/bin/vmservice/client/observatory/packages/observatory/src/observatory/application.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..40e6f80354a13a3ba3c594651eb0428f7112ecf4
|
| --- /dev/null
|
| +++ b/runtime/bin/vmservice/client/observatory/packages/observatory/src/observatory/application.dart
|
| @@ -0,0 +1,31 @@
|
| +part of observatory;
|
| +
|
| +/// The observatory application. Instances of this are created and owned
|
| +/// by the observatory_application custom element.
|
| +class ObservatoryApplication {
|
| + final Anchor anchor = new Anchor();
|
| + final RequestManager requestManager = new HttpRequestManager();
|
| + final IsolateManager isolateManager = new IsolateManager();
|
| +
|
| + ObservatoryApplication() {
|
| + anchor._application = this;
|
| + requestManager._application = this;
|
| + isolateManager._application = this;
|
| + requestManager.interceptor = isolateManager._responseInterceptor;
|
| + anchor.init();
|
| + }
|
| +
|
| + /// Return the [Isolate] with [id].
|
| + Isolate getIsolate(int id) {
|
| + return isolateManager.isolates[id];
|
| + }
|
| +
|
| + /// Return the name of the isolate with [id].
|
| + String getIsolateName(int id) {
|
| + var isolate = getIsolate(id);
|
| + if (isolate == null) {
|
| + return 'Null Isolate';
|
| + }
|
| + return isolate.name;
|
| + }
|
| +}
|
|
|