microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
58882bb6b3dda8f9ee5cf6fad0f03021b3cb44a3

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/cdp-proxy/CDPMessageHandlers/baseCDPMessageHandler.ts

34lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import { ICDPMessageHandler, ProcessedCDPMessage } from "./ICDPMessageHandler";
5import { Connection } from "vscode-cdp-proxy";
6
7export abstract class BaseCDPMessageHandler implements ICDPMessageHandler {
8 protected debuggerTarget: Connection | null;
9 protected applicationTarget: Connection | null;
10
11 constructor() {}
12
13 public processDebuggerCDPMessage(event: any): ProcessedCDPMessage {
14 return {
15 event,
16 sendBack: false,
17 };
18 }
19
20 public processApplicationCDPMessage(event: any): ProcessedCDPMessage {
21 return {
22 event,
23 sendBack: false,
24 };
25 }
26
27 public setDebuggerTarget(debuggerTarget: Connection | null): void {
28 this.debuggerTarget = debuggerTarget;
29 }
30
31 public setApplicationTarget(applicationTarget: Connection | null): void {
32 this.applicationTarget = applicationTarget;
33 }
34}