/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/import{IURLService,IURLHandler}from'vs/platform/url/common/url';import{URI}from'vs/base/common/uri';import{IMainProcessService}from'vs/platform/ipc/electron-browser/mainProcessService';import{URLServiceChannelClient,URLHandlerChannel}from'vs/platform/url/node/urlIpc';import{URLService}from'vs/platform/url/common/urlService';exportclassRelayURLServiceextendsURLServiceimplementsIURLHandler{privateurlService:IURLService;constructor(@IMainProcessServicemainProcessService:IMainProcessService){super();this.urlService=newURLServiceChannelClient(mainProcessService.getChannel('url'));mainProcessService.registerChannel('urlHandler',newURLHandlerChannel(this));}open(uri:URI):Promise<boolean>{returnthis.urlService.open(uri);}handleURL(uri:URI):Promise<boolean>{returnsuper.open(uri);}}