@@ -9,7 +9,7 @@ import type * as Platform from '../platform/platform.js';
99import * as ProtocolClient from '../protocol_client/protocol_client.js' ;
1010import * as Root from '../root/root.js' ;
1111
12- import { RehydratingConnection } from './RehydratingConnection.js' ;
12+ import { RehydratingConnectionTransport } from './RehydratingConnection.js' ;
1313
1414const UIStrings = {
1515 /**
@@ -81,7 +81,7 @@ export class MainConnection implements ProtocolClient.ConnectionTransport.Connec
8181 }
8282}
8383
84- export class WebSocketConnection implements ProtocolClient . ConnectionTransport . ConnectionTransport {
84+ export class WebSocketTransport implements ProtocolClient . ConnectionTransport . ConnectionTransport {
8585 #socket: WebSocket | null ;
8686 onMessage : ( ( arg0 : Object | string ) => void ) | null = null ;
8787 #onDisconnect: ( ( arg0 : string ) => void ) | null = null ;
@@ -176,7 +176,7 @@ export class WebSocketConnection implements ProtocolClient.ConnectionTransport.C
176176 }
177177}
178178
179- export class StubConnection implements ProtocolClient . ConnectionTransport . ConnectionTransport {
179+ export class StubTransport implements ProtocolClient . ConnectionTransport . ConnectionTransport {
180180 onMessage : ( ( arg0 : Object | string ) => void ) | null = null ;
181181 #onDisconnect: ( ( arg0 : string ) => void ) | null = null ;
182182
@@ -216,28 +216,28 @@ export class StubConnection implements ProtocolClient.ConnectionTransport.Connec
216216export async function initMainConnection (
217217 createRootTarget : ( ) => Promise < void > ,
218218 onConnectionLost : ( message : Platform . UIString . LocalizedString ) => void ) : Promise < void > {
219- ProtocolClient . ConnectionTransport . ConnectionTransport . setFactory ( createMainConnection . bind ( null , onConnectionLost ) ) ;
219+ ProtocolClient . ConnectionTransport . ConnectionTransport . setFactory ( createMainTransport . bind ( null , onConnectionLost ) ) ;
220220 await createRootTarget ( ) ;
221221 Host . InspectorFrontendHost . InspectorFrontendHostInstance . connectionReady ( ) ;
222222}
223223
224- function createMainConnection ( onConnectionLost : ( message : Platform . UIString . LocalizedString ) => void ) :
224+ function createMainTransport ( onConnectionLost : ( message : Platform . UIString . LocalizedString ) => void ) :
225225 ProtocolClient . ConnectionTransport . ConnectionTransport {
226226 if ( Root . Runtime . Runtime . isTraceApp ( ) ) {
227- return new RehydratingConnection ( onConnectionLost ) ;
227+ return new RehydratingConnectionTransport ( onConnectionLost ) ;
228228 }
229229
230230 const wsParam = Root . Runtime . Runtime . queryParam ( 'ws' ) ;
231231 const wssParam = Root . Runtime . Runtime . queryParam ( 'wss' ) ;
232232 if ( wsParam || wssParam ) {
233233 const ws = ( wsParam ? `ws://${ wsParam } ` : `wss://${ wssParam } ` ) as Platform . DevToolsPath . UrlString ;
234- return new WebSocketConnection ( ws , onConnectionLost ) ;
234+ return new WebSocketTransport ( ws , onConnectionLost ) ;
235235 }
236236
237237 const notEmbeddedOrWs = Host . InspectorFrontendHost . InspectorFrontendHostInstance . isHostedMode ( ) ;
238238 if ( notEmbeddedOrWs ) {
239239 // eg., hosted mode (e.g. `http://localhost:9222/devtools/inspector.html`) without a WebSocket URL,
240- return new StubConnection ( ) ;
240+ return new StubTransport ( ) ;
241241 }
242242
243243 return new MainConnection ( ) ;
0 commit comments