microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.5.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/cdp-proxy/CDPMessageHandlers/baseCDPMessageHandler.ts

32lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

import { ICDPMessageHandler, ProcessedCDPMessage } from "./ICDPMessageHandler";
import { Connection } from "vscode-cdp-proxy";

export abstract class BaseCDPMessageHandler implements ICDPMessageHandler {
    protected debuggerTarget: Connection | null;
    protected applicationTarget: Connection | null;

    public processDebuggerCDPMessage(event: any): ProcessedCDPMessage {
        return {
            event,
            sendBack: false,
        };
    }

    public processApplicationCDPMessage(event: any): ProcessedCDPMessage {
        return {
            event,
            sendBack: false,
        };
    }

    public setDebuggerTarget(debuggerTarget: Connection | null): void {
        this.debuggerTarget = debuggerTarget;
    }

    public setApplicationTarget(applicationTarget: Connection | null): void {
        this.applicationTarget = applicationTarget;
    }
}