import { ThemeIcon } from "../../../../base/common/themables.js"; import { URI } from "../../../../base/common/uri.js"; import { INavigateOptions, IBrowserEditorViewState, IBrowserViewSessionRequest, IBrowserViewModel } from "./browserView.js"; import { IBrowserViewWorkbenchService } from "./browserView.service.js"; import { EditorInputCapabilities, GroupIdentifier, IEditorSerializer, IMoveResult, IUntypedEditorInput, Verbosity } from "../../../common/editor.js"; import { EditorInput } from "../../../common/editor/editorInput.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { ITelemetryService } from "../../../../platform/telemetry/common/telemetry.service.js"; import { IDisposable } from "../../../../base/common/lifecycle.js"; import { Event } from "../../../../base/common/event.js"; import { IBrowserViewNetwork } from "../../../../platform/browserView/common/browserView.js"; /** Data used to create and serialize a browser editor input. */ export interface IBrowserEditorInputData extends IBrowserEditorViewState { readonly id: string; readonly associatedResource?: URI; } /** * Reads browser view state saved or carried in editor options by any build, * ignoring values this build does not understand. */ export declare function reviveBrowserEditorViewState(value: object | undefined): IBrowserEditorViewState; /** * Fired before a {@link BrowserEditorInput} is disposed. Listeners may call * {@link veto} to prevent disposal and keep the input and its model alive. */ export interface IBeforeDisposeBrowserEditorEvent { veto(): void; } export declare class BrowserEditorInput extends EditorInput { private _resolveModel; private readonly themeService; private readonly telemetryService; private readonly browserViewWorkbenchService; static readonly ID = "workbench.editorinputs.browser"; static readonly EDITOR_ID = "workbench.editor.browser"; static readonly DEFAULT_LABEL: string; private readonly _id; private readonly _associatedResource; private _initialData; private _model; private _modelPromise; private _modelStore; private readonly _onBeforeDispose; readonly onBeforeDispose: Event; private readonly _onDidResolveModel; readonly onDidResolveModel: Event; constructor(options: IBrowserEditorInputData, _resolveModel: () => Promise, themeService: IThemeService, telemetryService: ITelemetryService, browserViewWorkbenchService: IBrowserViewWorkbenchService); get model(): IBrowserViewModel | undefined; set model(model: IBrowserViewModel); onceModelResolves(cb: (model: IBrowserViewModel) => void): IDisposable; get id(): string; get associatedResource(): URI | undefined; /** The saved session request, which may differ from the model's session under current restrictions, such as a host that cannot proxy browsers. A network whose proxy fails to start fails the view instead. */ get session(): IBrowserViewSessionRequest | undefined; /** The remote network this view was opened for, or `undefined` for the local network. */ get network(): IBrowserViewNetwork | undefined; get url(): string | undefined; get title(): string | undefined; get favicon(): string | undefined; /** * Whether this editor was opened via a default localhost link open (setting * not explicitly configured by the user). Transient — not serialized. */ get isDefaultLinkOpen(): boolean; get isSharingAvailable(): boolean; navigate(url: string, options?: INavigateOptions): void; resolve(): Promise; get typeId(): string; get editorId(): string; get capabilities(): EditorInputCapabilities; get resource(): URI; get preferredResource(): URI; getIcon(): ThemeIcon | URI | undefined; getName(): string; getTitle(verbosity?: Verbosity): string; getDescription(verbosity?: Verbosity): string | undefined; private readonly getURLTitles; canReopen(): boolean; matches(otherInput: EditorInput | IUntypedEditorInput): boolean; /** * Creates a copy of this browser editor input with a new unique ID, creating an independent browser view with no linked state. * This is used during Copy into New Window. */ copy(): EditorInput; toUntyped(): IUntypedEditorInput; rename(_group: GroupIdentifier, target: URI): Promise; dispose(force?: boolean): void; serialize(): IBrowserEditorInputData; private getViewState; } export declare class BrowserEditorSerializer implements IEditorSerializer { canSerialize(editorInput: EditorInput): editorInput is BrowserEditorInput; serialize(editorInput: EditorInput): string | undefined; deserialize(instantiationService: IInstantiationService, serializedEditor: string): EditorInput | undefined; }