mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 05:51:32 +01:00
More adoption of @extHostNamedCustomer
This commit is contained in:
@@ -6,19 +6,24 @@
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { MainThreadTelemetryShape } from '../node/extHost.protocol';
|
||||
import { MainThreadTelemetryShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
|
||||
import { extHostNamedCustomer } from "vs/workbench/api/electron-browser/extHostCustomers";
|
||||
|
||||
/**
|
||||
* Helper always instantiated in the main process to receive telemetry events from remote telemetry services
|
||||
*/
|
||||
@extHostNamedCustomer(MainContext.MainThreadTelemetry)
|
||||
export class MainThreadTelemetry implements MainThreadTelemetryShape {
|
||||
|
||||
private _telemetryService: ITelemetryService;
|
||||
|
||||
constructor( @ITelemetryService telemetryService: ITelemetryService) {
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@ITelemetryService telemetryService: ITelemetryService
|
||||
) {
|
||||
this._telemetryService = telemetryService;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
}
|
||||
|
||||
public $publicLog(eventName: string, data?: any): void {
|
||||
this._telemetryService.publicLog(eventName, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user