import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { MojoBrowserProxyFactory } from '//resources/mojo/mojo_browser_proxy.js';
import type { MojoBrowserProxy } from '//resources/mojo/mojo_browser_proxy.js';
import { Point as gfx_mojom_Point } from '//resources/mojo/ui/gfx/geometry/mojom/geometry.mojom-webui.js';
import { Range as gfx_mojom_Range } from '//resources/mojo/ui/gfx/range/mojom/range.mojom-webui.js';
export declare const OmniboxEscapeActionSpec: {
    $: mojo.internal.MojomType;
};
export declare enum OmniboxEscapeAction {
    MIN_VALUE = 1,
    MAX_VALUE = 5,
    kRevertTemporaryText = 1,
    kClosePopup = 2,
    kClearUserInput = 3,
    kClosePopupAndClearUserInput = 4,
    kBlur = 5
}
export type PageHandlerFactoryPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PageHandlerFactoryPendingReceiver>;
export declare class PageHandlerFactoryPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<PageHandlerFactory> {
    handle: mojo.internal.interfaceSupport.Endpoint<PageHandlerFactoryPendingReceiver>;
    constructor(handle: MojoHandle | PageHandlerFactoryPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageHandlerFactoryInterface {
    createPageHandler(page: PageRemote, handler: PageHandlerPendingReceiver): void;
}
export declare class PageHandlerFactoryRemote implements PageHandlerFactoryInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PageHandlerFactoryPendingReceiverEndpoint);
    createPageHandler(page: PageRemote, handler: PageHandlerPendingReceiver): void;
}
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageHandlerFactoryReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerFactoryRemote, PageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageHandlerFactoryInterface);
}
export declare class PageHandlerFactory {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageHandlerFactoryRemote;
}
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageHandlerFactoryCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerFactoryRemote, PageHandlerFactoryPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    createPageHandler: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(page: PageRemote, handler: PageHandlerPendingReceiver) => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export type PageHandlerPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PageHandlerPendingReceiver>;
export declare class PageHandlerPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<PageHandler> {
    handle: mojo.internal.interfaceSupport.Endpoint<PageHandlerPendingReceiver>;
    constructor(handle: MojoHandle | PageHandlerPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageHandlerInterface {
    showContextMenu(point: gfx_mojom_Point): void;
    closeUI(): void;
    onSelectionChanged(selection: gfx_mojom_Range, sequenceNumber: number, showFullUrl: boolean): void;
    revert(sequenceNumber: number): void;
    logEscapeAction(action: OmniboxEscapeAction): void;
    onInputCleared(sequenceNumber: number): void;
    requestInputState(): void;
}
export declare class PageHandlerRemote implements PageHandlerInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PageHandlerPendingReceiverEndpoint);
    showContextMenu(point: gfx_mojom_Point): void;
    closeUI(): void;
    onSelectionChanged(selection: gfx_mojom_Range, sequenceNumber: number, showFullUrl: boolean): void;
    revert(sequenceNumber: number): void;
    logEscapeAction(action: OmniboxEscapeAction): void;
    onInputCleared(sequenceNumber: number): void;
    requestInputState(): void;
}
/**
 * An object which receives request messages for the PageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageHandlerReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerRemote, PageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageHandlerInterface);
}
export declare class PageHandler {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageHandlerRemote;
}
/**
 * An object which receives request messages for the PageHandler
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageHandlerCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerRemote, PageHandlerPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    showContextMenu: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(point: gfx_mojom_Point) => any>;
    closeUI: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    onSelectionChanged: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(selection: gfx_mojom_Range, sequenceNumber: number, showFullUrl: boolean) => any>;
    revert: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(sequenceNumber: number) => any>;
    logEscapeAction: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(action: OmniboxEscapeAction) => any>;
    onInputCleared: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(sequenceNumber: number) => any>;
    requestInputState: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export type PagePendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PagePendingReceiver>;
export declare class PagePendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<Page> {
    handle: mojo.internal.interfaceSupport.Endpoint<PagePendingReceiver>;
    constructor(handle: MojoHandle | PagePendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageInterface {
    onShow(): void;
    onContextMenuClosed(): void;
    setInputState(state: OmniboxInputState): void;
    setFocus(isFocused: boolean): void;
}
export declare class PageRemote implements PageInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PagePendingReceiverEndpoint);
    onShow(): void;
    onContextMenuClosed(): void;
    setInputState(state: OmniboxInputState): void;
    setFocus(isFocused: boolean): void;
}
/**
 * An object which receives request messages for the Page
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageRemote, PagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageInterface);
}
export declare class Page {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageRemote;
}
/**
 * An object which receives request messages for the Page
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageRemote, PagePendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    onShow: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    onContextMenuClosed: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    setInputState: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(state: OmniboxInputState) => any>;
    setFocus: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(isFocused: boolean) => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export declare const OmniboxInputStateSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandlerFactory_CreatePageHandler_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_ShowContextMenu_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_CloseUI_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_OnSelectionChanged_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_Revert_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_LogEscapeAction_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_OnInputCleared_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_RequestInputState_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_OnShow_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_OnContextMenuClosed_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_SetInputState_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_SetFocus_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export interface OmniboxInputStateMojoType {
    sequenceNumber: number;
    userInputInProgress: boolean;
    isFocused: boolean;
    showFullUrl: boolean;
    text: string;
    selection: gfx_mojom_Range;
    fullUrl: string;
    permanentDisplayText: string;
}
export type OmniboxInputState = OmniboxInputStateMojoType;
export interface PageHandlerFactory_CreatePageHandler_ParamsMojoType {
    page: PageRemote;
    handler: PageHandlerPendingReceiver;
}
export type PageHandlerFactory_CreatePageHandler_Params = PageHandlerFactory_CreatePageHandler_ParamsMojoType;
export interface PageHandler_ShowContextMenu_ParamsMojoType {
    point: gfx_mojom_Point;
}
export type PageHandler_ShowContextMenu_Params = PageHandler_ShowContextMenu_ParamsMojoType;
export interface PageHandler_CloseUI_ParamsMojoType {
}
export type PageHandler_CloseUI_Params = PageHandler_CloseUI_ParamsMojoType;
export interface PageHandler_OnSelectionChanged_ParamsMojoType {
    selection: gfx_mojom_Range;
    sequenceNumber: number;
    showFullUrl: boolean;
}
export type PageHandler_OnSelectionChanged_Params = PageHandler_OnSelectionChanged_ParamsMojoType;
export interface PageHandler_Revert_ParamsMojoType {
    sequenceNumber: number;
}
export type PageHandler_Revert_Params = PageHandler_Revert_ParamsMojoType;
export interface PageHandler_LogEscapeAction_ParamsMojoType {
    action: OmniboxEscapeAction;
}
export type PageHandler_LogEscapeAction_Params = PageHandler_LogEscapeAction_ParamsMojoType;
export interface PageHandler_OnInputCleared_ParamsMojoType {
    sequenceNumber: number;
}
export type PageHandler_OnInputCleared_Params = PageHandler_OnInputCleared_ParamsMojoType;
export interface PageHandler_RequestInputState_ParamsMojoType {
}
export type PageHandler_RequestInputState_Params = PageHandler_RequestInputState_ParamsMojoType;
export interface Page_OnShow_ParamsMojoType {
}
export type Page_OnShow_Params = Page_OnShow_ParamsMojoType;
export interface Page_OnContextMenuClosed_ParamsMojoType {
}
export type Page_OnContextMenuClosed_Params = Page_OnContextMenuClosed_ParamsMojoType;
export interface Page_SetInputState_ParamsMojoType {
    state: OmniboxInputState;
}
export type Page_SetInputState_Params = Page_SetInputState_ParamsMojoType;
export interface Page_SetFocus_ParamsMojoType {
    isFocused: boolean;
}
export type Page_SetFocus_Params = Page_SetFocus_ParamsMojoType;
export type BrowserProxy = MojoBrowserProxy<PageHandlerInterface, PageCallbackRouter>;
export declare const browserProxyFactory: MojoBrowserProxyFactory<PageHandlerInterface, PageRemote, PageHandlerPendingReceiver, PagePendingReceiver, PageCallbackRouter, PageHandlerRemote>;
