/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
export type ProtocolCommand = {
    id: number;
    method: string;
    params?: any;
};
export interface RelayContext {
    readonly attachedTabs: ReadonlySet<number>;
    sendMessage(message: any): void;
    notifyTabAttached(tabId: number): void;
    notifyTabDetached(tabId: number): void;
}
export interface ProtocolHandler {
    handleCommand(message: ProtocolCommand): Promise<any>;
    forwardChromeEvent(fullMethod: string, args: any[]): void;
    onUserAttachRequest(tab: chrome.tabs.Tab): void;
    onUserDetachRequest(tabId: number): void;
    didInitialize(): void;
}
export declare class ProtocolV1Handler implements ProtocolHandler {
    private _context;
    private _selectedTabPromise;
    private _selectedTabResolve;
    constructor(context: RelayContext);
    handleCommand(message: ProtocolCommand): Promise<any>;
    forwardChromeEvent(fullMethod: string, args: any[]): void;
    onUserAttachRequest(tab: chrome.tabs.Tab): void;
    onUserDetachRequest(_tabId: number): void;
    didInitialize(): void;
}
export declare class ProtocolV2Handler implements ProtocolHandler {
    private _context;
    constructor(context: RelayContext);
    handleCommand(message: ProtocolCommand): Promise<any>;
    forwardChromeEvent(fullMethod: string, args: any[]): void;
    onUserAttachRequest(tab: chrome.tabs.Tab): void;
    didInitialize(): void;
    onUserDetachRequest(tabId: number): void;
}
export declare function resolveChromeMember(fullMethod: string): {
    obj: any;
    name: string;
};
//# sourceMappingURL=protocolHandlers.d.ts.map