import { Event } from "../../../../base/common/event.js"; import { CDPRequest, CDPResponse, CDPEvent } from "../../../../platform/browserView/common/cdp/types.js"; import { IBrowserViewModel } from "./browserView.js"; export declare const IBrowserViewWorkbenchService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Workbench-level service for browser views that provides model-based access to browser views. * This service manages browser view models that proxy to the main process browser view service. */ export interface IBrowserViewWorkbenchService { readonly _serviceBrand: undefined; /** * Get or create a browser view model for the given ID * @param id The browser view identifier * @returns A browser view model that proxies to the main process */ getOrCreateBrowserViewModel(id: string): Promise; /** * Get an existing browser view model for the given ID * @param id The browser view identifier * @returns A browser view model that proxies to the main process * @throws If no browser view exists for the given ID */ getBrowserViewModel(id: string): Promise; /** * Clear all storage data for the global browser session */ clearGlobalStorage(): Promise; /** * Clear all storage data for the current workspace browser session */ clearWorkspaceStorage(): Promise; } export declare const IBrowserViewCDPService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Workbench-level service for managing CDP (Chrome DevTools Protocol) sessions * against browser views. Handles group lifecycle and window ID resolution. */ export interface IBrowserViewCDPService { readonly _serviceBrand: undefined; /** * Create a new CDP group for a browser view. * The window ID is resolved from the editor group containing the browser. * @param browserId The browser view identifier. * @returns The ID of the newly created group. */ createSessionGroup(browserId: string): Promise; /** Destroy a CDP group. */ destroySessionGroup(groupId: string): Promise; /** Send a CDP message to a group. */ sendCDPMessage(groupId: string, message: CDPRequest): Promise; /** Fires when a CDP message is received. */ onCDPMessage(groupId: string): Event; /** Fires when a CDP group is destroyed. */ onDidDestroy(groupId: string): Event; }