Add a mechanism to be a customer of the extension host (share lifecycle) and begin reducing usage of IThreadService

This commit is contained in:
Alex Dima
2017-08-15 18:26:35 +02:00
parent 8bad13987d
commit 20a45eef3a
27 changed files with 260 additions and 137 deletions

View File

@@ -7,8 +7,7 @@
import { notImplemented } from 'vs/base/common/errors';
import { TPromise } from 'vs/base/common/winjs.base';
import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { MainContext, MainThreadTelemetryShape } from './extHost.protocol';
import { MainContext, MainThreadTelemetryShape, IMainContext } from './extHost.protocol';
export class RemoteTelemetryService implements ITelemetryService {
@@ -17,9 +16,9 @@ export class RemoteTelemetryService implements ITelemetryService {
private _name: string;
private _proxy: MainThreadTelemetryShape;
constructor(name: string, threadService: IThreadService) {
constructor(name: string, mainContext: IMainContext) {
this._name = name;
this._proxy = threadService.get(MainContext.MainThreadTelemetry);
this._proxy = mainContext.get(MainContext.MainThreadTelemetry);
}
get isOptedIn(): boolean {