/**
 * 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.
 */
import { BrowserContext } from './browserContext';
import { ChannelOwner } from './channelOwner';
import type { BrowserType } from './browserType';
import type { Page } from './page';
import type { BrowserContextOptions, LaunchOptions, Logger } from './types';
import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
export declare class Browser extends ChannelOwner<channels.BrowserChannel> implements api.Browser {
    readonly _contexts: Set<BrowserContext>;
    private _isConnected;
    private _closedPromise;
    _shouldCloseConnectionOnClose: boolean;
    _browserType: BrowserType;
    private _options;
    readonly _name: string;
    readonly _browserName: 'chromium' | 'webkit' | 'firefox';
    private _path;
    _closeReason: string | undefined;
    static from(browser: channels.BrowserChannel): Browser;
    constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.BrowserInitializer);
    browserType(): BrowserType;
    newContext(options?: BrowserContextOptions): Promise<BrowserContext>;
    _newContextForReuse(options?: BrowserContextOptions): Promise<BrowserContext>;
    _disconnectFromReusedContext(reason: string): Promise<void>;
    _innerNewContext(userOptions: BrowserContextOptions | undefined, forReuse: boolean): Promise<BrowserContext>;
    _connectToBrowserType(browserType: BrowserType, browserOptions: LaunchOptions, logger: Logger | undefined): void;
    private _didCreateContext;
    private _setupBrowserContext;
    contexts(): BrowserContext[];
    version(): string;
    bind(title: string, options?: {
        workspaceDir?: string;
        metadata?: Record<string, any>;
        host?: string;
        port?: number;
    }): Promise<{
        endpoint: string;
    }>;
    unbind(): Promise<void>;
    newPage(options?: BrowserContextOptions): Promise<Page>;
    isConnected(): boolean;
    newBrowserCDPSession(): Promise<api.CDPSession>;
    startTracing(page?: Page, options?: {
        path?: string;
        screenshots?: boolean;
        categories?: string[];
    }): Promise<void>;
    stopTracing(): Promise<Buffer>;
    [Symbol.asyncDispose](): Promise<void>;
    close(options?: {
        reason?: string;
    }): Promise<void>;
    _didClose(): void;
}
//# sourceMappingURL=browser.d.ts.map