Path: blob/main/src/vs/workbench/services/extensionManagement/browser/extensionGalleryManifestService.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { IExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifest.js';6import { ExtensionGalleryManifestService as ExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifestService.js';7import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';8import { IProductService } from '../../../../platform/product/common/productService.js';9import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';1011class WebExtensionGalleryManifestService extends ExtensionGalleryManifestService implements IExtensionGalleryManifestService {1213constructor(14@IProductService productService: IProductService,15@IRemoteAgentService remoteAgentService: IRemoteAgentService,16) {17super(productService);18const remoteConnection = remoteAgentService.getConnection();19if (remoteConnection) {20const channel = remoteConnection.getChannel('extensionGalleryManifest');21this.getExtensionGalleryManifest().then(manifest => {22channel.call('setExtensionGalleryManifest', [manifest]);23this._register(this.onDidChangeExtensionGalleryManifest(manifest => channel.call('setExtensionGalleryManifest', [manifest])));24});25}26}2728}2930registerSingleton(IExtensionGalleryManifestService, WebExtensionGalleryManifestService, InstantiationType.Delayed);313233