// chrome/browser/ui/webui/tab_search/tab_search.mojom-webui.ts is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { MojoBrowserProxyFactory } from '//resources/mojo/mojo_browser_proxy.js';
import { ColorSpec as tabGroups_mojom_ColorSpec } from './tab_group_types.mojom-webui.js';
import { TabAlertStateSpec as tabs_mojom_TabAlertStateSpec } from './tabs.mojom-webui.js';
import { TimeSpec as mojoBase_mojom_TimeSpec, TimeTicksSpec as mojoBase_mojom_TimeTicksSpec } from '//resources/mojo/mojo/public/mojom/base/time.mojom-webui.js';
import { TokenSpec as mojoBase_mojom_TokenSpec } from '//resources/mojo/mojo/public/mojom/base/token.mojom-webui.js';
import { UrlSpec as url_mojom_UrlSpec } from '//resources/mojo/url/mojom/url.mojom-webui.js';
export const SplitTabLayoutSpec = { $: mojo.internal.Enum() };
export var SplitTabLayout;
(function (SplitTabLayout) {
    SplitTabLayout[SplitTabLayout["MIN_VALUE"] = 0] = "MIN_VALUE";
    SplitTabLayout[SplitTabLayout["MAX_VALUE"] = 1] = "MAX_VALUE";
    SplitTabLayout[SplitTabLayout["kSideBySide"] = 0] = "kSideBySide";
    SplitTabLayout[SplitTabLayout["kStacked"] = 1] = "kStacked";
})(SplitTabLayout || (SplitTabLayout = {}));
export class PageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'tab_search.mojom.PageHandlerFactory', scope);
    }
}
export class PageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createPageHandler(page, handler) {
        this.proxy.sendMessage(1281047200, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, [
            page,
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1281047200, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, impl.createPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class PageHandlerFactory {
    static get $interfaceName() {
        return "tab_search.mojom.PageHandlerFactory";
    }
    /**
     * 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() {
        let remote = new PageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * 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 class PageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createPageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1281047200, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, this.createPageHandler.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class PageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'tab_search.mojom.PageHandler', scope);
    }
}
export class PageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    closeTab(tabId) {
        this.proxy.sendMessage(885241339, PageHandler_CloseTab_ParamsSpec.$, null, [
            tabId
        ], false);
    }
    closeTabs(tabIds) {
        this.proxy.sendMessage(1018284743, PageHandler_CloseTabs_ParamsSpec.$, null, [
            tabIds
        ], false);
    }
    closeWebUiTab() {
        this.proxy.sendMessage(1609932284, PageHandler_CloseWebUiTab_ParamsSpec.$, null, [], false);
    }
    getProfileData() {
        return this.proxy.sendMessage(1569380218, PageHandler_GetProfileData_ParamsSpec.$, PageHandler_GetProfileData_ResponseParamsSpec.$, [], false);
    }
    getIsSplit() {
        return this.proxy.sendMessage(1177242286, PageHandler_GetIsSplit_ParamsSpec.$, PageHandler_GetIsSplit_ResponseParamsSpec.$, [], false);
    }
    switchToTab(switchToTabInfo) {
        this.proxy.sendMessage(53925400, PageHandler_SwitchToTab_ParamsSpec.$, null, [
            switchToTabInfo
        ], false);
    }
    openRecentlyClosedEntry(sessionId) {
        this.proxy.sendMessage(1012110187, PageHandler_OpenRecentlyClosedEntry_ParamsSpec.$, null, [
            sessionId
        ], false);
    }
    replaceActiveSplitTab(replacementTabId) {
        this.proxy.sendMessage(2042844619, PageHandler_ReplaceActiveSplitTab_ParamsSpec.$, null, [
            replacementTabId
        ], false);
    }
    saveRecentlyClosedExpandedPref(expanded) {
        this.proxy.sendMessage(1336173413, PageHandler_SaveRecentlyClosedExpandedPref_ParamsSpec.$, null, [
            expanded
        ], false);
    }
    startTabGroupTutorial() {
        this.proxy.sendMessage(902771694, PageHandler_StartTabGroupTutorial_ParamsSpec.$, null, [], false);
    }
    maybeShowUI() {
        this.proxy.sendMessage(1893829260, PageHandler_MaybeShowUI_ParamsSpec.$, null, [], false);
    }
    getRangesIgnoringCaseAndAccents(searchText, targets) {
        return this.proxy.sendMessage(181092121, PageHandler_GetRangesIgnoringCaseAndAccents_ParamsSpec.$, PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParamsSpec.$, [
            searchText,
            targets
        ], false);
    }
}
;
/**
 * An object which receives request messages for the PageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(885241339, PageHandler_CloseTab_ParamsSpec.$, null, impl.closeTab.bind(impl), false);
        this.helper_internal_.registerHandler(1018284743, PageHandler_CloseTabs_ParamsSpec.$, null, impl.closeTabs.bind(impl), false);
        this.helper_internal_.registerHandler(1609932284, PageHandler_CloseWebUiTab_ParamsSpec.$, null, impl.closeWebUiTab.bind(impl), false);
        this.helper_internal_.registerHandler(1569380218, PageHandler_GetProfileData_ParamsSpec.$, PageHandler_GetProfileData_ResponseParamsSpec.$, impl.getProfileData.bind(impl), false);
        this.helper_internal_.registerHandler(1177242286, PageHandler_GetIsSplit_ParamsSpec.$, PageHandler_GetIsSplit_ResponseParamsSpec.$, impl.getIsSplit.bind(impl), false);
        this.helper_internal_.registerHandler(53925400, PageHandler_SwitchToTab_ParamsSpec.$, null, impl.switchToTab.bind(impl), false);
        this.helper_internal_.registerHandler(1012110187, PageHandler_OpenRecentlyClosedEntry_ParamsSpec.$, null, impl.openRecentlyClosedEntry.bind(impl), false);
        this.helper_internal_.registerHandler(2042844619, PageHandler_ReplaceActiveSplitTab_ParamsSpec.$, null, impl.replaceActiveSplitTab.bind(impl), false);
        this.helper_internal_.registerHandler(1336173413, PageHandler_SaveRecentlyClosedExpandedPref_ParamsSpec.$, null, impl.saveRecentlyClosedExpandedPref.bind(impl), false);
        this.helper_internal_.registerHandler(902771694, PageHandler_StartTabGroupTutorial_ParamsSpec.$, null, impl.startTabGroupTutorial.bind(impl), false);
        this.helper_internal_.registerHandler(1893829260, PageHandler_MaybeShowUI_ParamsSpec.$, null, impl.maybeShowUI.bind(impl), false);
        this.helper_internal_.registerHandler(181092121, PageHandler_GetRangesIgnoringCaseAndAccents_ParamsSpec.$, PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParamsSpec.$, impl.getRangesIgnoringCaseAndAccents.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class PageHandler {
    static get $interfaceName() {
        return "tab_search.mojom.PageHandler";
    }
    /**
     * 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() {
        let remote = new PageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * 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 class PageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    closeTab;
    closeTabs;
    closeWebUiTab;
    getProfileData;
    getIsSplit;
    switchToTab;
    openRecentlyClosedEntry;
    replaceActiveSplitTab;
    saveRecentlyClosedExpandedPref;
    startTabGroupTutorial;
    maybeShowUI;
    getRangesIgnoringCaseAndAccents;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.closeTab =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(885241339, PageHandler_CloseTab_ParamsSpec.$, null, this.closeTab.createReceiverHandler(false /* expectsResponse */), false);
        this.closeTabs =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1018284743, PageHandler_CloseTabs_ParamsSpec.$, null, this.closeTabs.createReceiverHandler(false /* expectsResponse */), false);
        this.closeWebUiTab =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1609932284, PageHandler_CloseWebUiTab_ParamsSpec.$, null, this.closeWebUiTab.createReceiverHandler(false /* expectsResponse */), false);
        this.getProfileData =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1569380218, PageHandler_GetProfileData_ParamsSpec.$, PageHandler_GetProfileData_ResponseParamsSpec.$, this.getProfileData.createReceiverHandler(true /* expectsResponse */), false);
        this.getIsSplit =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1177242286, PageHandler_GetIsSplit_ParamsSpec.$, PageHandler_GetIsSplit_ResponseParamsSpec.$, this.getIsSplit.createReceiverHandler(true /* expectsResponse */), false);
        this.switchToTab =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(53925400, PageHandler_SwitchToTab_ParamsSpec.$, null, this.switchToTab.createReceiverHandler(false /* expectsResponse */), false);
        this.openRecentlyClosedEntry =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1012110187, PageHandler_OpenRecentlyClosedEntry_ParamsSpec.$, null, this.openRecentlyClosedEntry.createReceiverHandler(false /* expectsResponse */), false);
        this.replaceActiveSplitTab =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(2042844619, PageHandler_ReplaceActiveSplitTab_ParamsSpec.$, null, this.replaceActiveSplitTab.createReceiverHandler(false /* expectsResponse */), false);
        this.saveRecentlyClosedExpandedPref =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1336173413, PageHandler_SaveRecentlyClosedExpandedPref_ParamsSpec.$, null, this.saveRecentlyClosedExpandedPref.createReceiverHandler(false /* expectsResponse */), false);
        this.startTabGroupTutorial =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(902771694, PageHandler_StartTabGroupTutorial_ParamsSpec.$, null, this.startTabGroupTutorial.createReceiverHandler(false /* expectsResponse */), false);
        this.maybeShowUI =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1893829260, PageHandler_MaybeShowUI_ParamsSpec.$, null, this.maybeShowUI.createReceiverHandler(false /* expectsResponse */), false);
        this.getRangesIgnoringCaseAndAccents =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(181092121, PageHandler_GetRangesIgnoringCaseAndAccents_ParamsSpec.$, PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParamsSpec.$, this.getRangesIgnoringCaseAndAccents.createReceiverHandler(true /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class PagePendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'tab_search.mojom.Page', scope);
    }
}
export class PageRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PagePendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    hostWindowChanged() {
        this.proxy.sendMessage(1230811117, Page_HostWindowChanged_ParamsSpec.$, null, [], false);
    }
    tabsChanged(profileTabs) {
        this.proxy.sendMessage(1706189929, Page_TabsChanged_ParamsSpec.$, null, [
            profileTabs
        ], false);
    }
    tabUpdated(tabUpdateInfo) {
        this.proxy.sendMessage(1508102955, Page_TabUpdated_ParamsSpec.$, null, [
            tabUpdateInfo
        ], false);
    }
    tabsRemoved(tabsRemovedInfo) {
        this.proxy.sendMessage(2092448700, Page_TabsRemoved_ParamsSpec.$, null, [
            tabsRemovedInfo
        ], false);
    }
    tabUnsplit() {
        this.proxy.sendMessage(1243034568, Page_TabUnsplit_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the Page
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1230811117, Page_HostWindowChanged_ParamsSpec.$, null, impl.hostWindowChanged.bind(impl), false);
        this.helper_internal_.registerHandler(1706189929, Page_TabsChanged_ParamsSpec.$, null, impl.tabsChanged.bind(impl), false);
        this.helper_internal_.registerHandler(1508102955, Page_TabUpdated_ParamsSpec.$, null, impl.tabUpdated.bind(impl), false);
        this.helper_internal_.registerHandler(2092448700, Page_TabsRemoved_ParamsSpec.$, null, impl.tabsRemoved.bind(impl), false);
        this.helper_internal_.registerHandler(1243034568, Page_TabUnsplit_ParamsSpec.$, null, impl.tabUnsplit.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class Page {
    static get $interfaceName() {
        return "tab_search.mojom.Page";
    }
    /**
     * 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() {
        let remote = new PageRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * 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 class PageCallbackRouter {
    helper_internal_;
    $;
    router_;
    hostWindowChanged;
    tabsChanged;
    tabUpdated;
    tabsRemoved;
    tabUnsplit;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.hostWindowChanged =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1230811117, Page_HostWindowChanged_ParamsSpec.$, null, this.hostWindowChanged.createReceiverHandler(false /* expectsResponse */), false);
        this.tabsChanged =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1706189929, Page_TabsChanged_ParamsSpec.$, null, this.tabsChanged.createReceiverHandler(false /* expectsResponse */), false);
        this.tabUpdated =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1508102955, Page_TabUpdated_ParamsSpec.$, null, this.tabUpdated.createReceiverHandler(false /* expectsResponse */), false);
        this.tabsRemoved =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(2092448700, Page_TabsRemoved_ParamsSpec.$, null, this.tabsRemoved.createReceiverHandler(false /* expectsResponse */), false);
        this.tabUnsplit =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1243034568, Page_TabUnsplit_ParamsSpec.$, null, this.tabUnsplit.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export const TokenRangeSpec = { $: {} };
export const ProfileDataSpec = { $: {} };
export const WindowSpec = { $: {} };
export const TabSpec = { $: {} };
export const RecentlyClosedTabSpec = { $: {} };
export const TabGroupSpec = { $: {} };
export const RecentlyClosedTabGroupSpec = { $: {} };
export const RecentlyClosedSplitViewSpec = { $: {} };
export const SwitchToTabInfoSpec = { $: {} };
export const TabUpdateInfoSpec = { $: {} };
export const TabsRemovedInfoSpec = { $: {} };
export const PageHandlerFactory_CreatePageHandler_ParamsSpec = { $: {} };
export const PageHandler_CloseTab_ParamsSpec = { $: {} };
export const PageHandler_CloseTabs_ParamsSpec = { $: {} };
export const PageHandler_CloseWebUiTab_ParamsSpec = { $: {} };
export const PageHandler_GetProfileData_ParamsSpec = { $: {} };
export const PageHandler_GetProfileData_ResponseParamsSpec = { $: {} };
export const PageHandler_GetIsSplit_ParamsSpec = { $: {} };
export const PageHandler_GetIsSplit_ResponseParamsSpec = { $: {} };
export const PageHandler_SwitchToTab_ParamsSpec = { $: {} };
export const PageHandler_OpenRecentlyClosedEntry_ParamsSpec = { $: {} };
export const PageHandler_ReplaceActiveSplitTab_ParamsSpec = { $: {} };
export const PageHandler_SaveRecentlyClosedExpandedPref_ParamsSpec = { $: {} };
export const PageHandler_StartTabGroupTutorial_ParamsSpec = { $: {} };
export const PageHandler_MaybeShowUI_ParamsSpec = { $: {} };
export const PageHandler_GetRangesIgnoringCaseAndAccents_ParamsSpec = { $: {} };
export const PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParamsSpec = { $: {} };
export const Page_HostWindowChanged_ParamsSpec = { $: {} };
export const Page_TabsChanged_ParamsSpec = { $: {} };
export const Page_TabUpdated_ParamsSpec = { $: {} };
export const Page_TabsRemoved_ParamsSpec = { $: {} };
export const Page_TabUnsplit_ParamsSpec = { $: {} };
mojo.internal.Struct(TokenRangeSpec.$, 'TokenRange', [
    mojo.internal.StructField('start', 0, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('length', 4, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(ProfileDataSpec.$, 'ProfileData', [
    mojo.internal.StructField('windows', 0, 0, mojo.internal.Array(WindowSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabGroups', 8, 0, mojo.internal.Array(TabGroupSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('recentlyClosedTabs', 16, 0, mojo.internal.Array(RecentlyClosedTabSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('recentlyClosedTabGroups', 24, 0, mojo.internal.Array(RecentlyClosedTabGroupSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('recentlyClosedSplitViews', 32, 0, mojo.internal.Array(RecentlyClosedSplitViewSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('recentlyClosedSectionExpanded', 40, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 56],]);
mojo.internal.Struct(WindowSpec.$, 'Window', [
    mojo.internal.StructField('active', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('isHostWindow', 0, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('height', 4, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabs', 8, 0, mojo.internal.Array(TabSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(TabSpec.$, 'Tab', [
    mojo.internal.StructField('active', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('visible', 0, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('alertStates', 8, 0, mojo.internal.Array(tabs_mojom_TabAlertStateSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabId', 4, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('groupId', 16, 0, mojoBase_mojom_TokenSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('pinned', 0, 2, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('split', 0, 3, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('splitId', 24, 0, mojoBase_mojom_TokenSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('split_layout_$flag', 0, 4, mojo.internal.Bool, false, false /* nullable */, 0, {
        isPrimary: true,
        linkedValueFieldName: "split_layout_$value",
        originalFieldName: "splitLayout",
    }, undefined),
    mojo.internal.StructField('split_layout_$value', 32, 0, SplitTabLayoutSpec.$, 0, false /* nullable */, 0, {
        isPrimary: false,
        originalFieldName: "splitLayout",
    }, undefined),
    mojo.internal.StructField('title', 40, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('url', 48, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('faviconUrl', 56, 0, url_mojom_UrlSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('isDefaultFavicon', 0, 5, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('showIcon', 0, 6, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveTimeTicks', 64, 0, mojoBase_mojom_TimeTicksSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveElapsedText', 72, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 88],]);
mojo.internal.Struct(RecentlyClosedTabSpec.$, 'RecentlyClosedTab', [
    mojo.internal.StructField('tabId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('groupId', 8, 0, mojoBase_mojom_TokenSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('splitId', 16, 0, mojoBase_mojom_TokenSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('title', 24, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('url', 32, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveTime', 40, 0, mojoBase_mojom_TimeSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveElapsedText', 48, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 64],]);
mojo.internal.Struct(TabGroupSpec.$, 'TabGroup', [
    mojo.internal.StructField('id', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('color', 8, 0, tabGroups_mojom_ColorSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('title', 16, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(RecentlyClosedTabGroupSpec.$, 'RecentlyClosedTabGroup', [
    mojo.internal.StructField('sessionId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('id', 8, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('color', 4, 0, tabGroups_mojom_ColorSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('title', 16, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabCount', 24, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveTime', 32, 0, mojoBase_mojom_TimeSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveElapsedText', 40, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 56],]);
mojo.internal.Struct(RecentlyClosedSplitViewSpec.$, 'RecentlyClosedSplitView', [
    mojo.internal.StructField('sessionId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('id', 8, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabCount', 4, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveTime', 16, 0, mojoBase_mojom_TimeSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastActiveElapsedText', 24, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tabUrls', 32, 0, mojo.internal.Array(url_mojom_UrlSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('layout', 40, 0, SplitTabLayoutSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('groupId', 48, 0, mojoBase_mojom_TokenSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 64],]);
mojo.internal.Struct(SwitchToTabInfoSpec.$, 'SwitchToTabInfo', [
    mojo.internal.StructField('tabId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(TabUpdateInfoSpec.$, 'TabUpdateInfo', [
    mojo.internal.StructField('inActiveWindow', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('inHostWindow', 0, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tab', 8, 0, TabSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(TabsRemovedInfoSpec.$, 'TabsRemovedInfo', [
    mojo.internal.StructField('tabIds', 0, 0, mojo.internal.Array(mojo.internal.Int32, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('recentlyClosedTabs', 8, 0, mojo.internal.Array(RecentlyClosedTabSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandlerFactory_CreatePageHandler_ParamsSpec.$, 'PageHandlerFactory_CreatePageHandler_Params', [
    mojo.internal.StructField('page', 0, 0, mojo.internal.InterfaceProxy(PageRemote), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('handler', 8, 0, mojo.internal.InterfaceRequest(PageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_CloseTab_ParamsSpec.$, 'PageHandler_CloseTab_Params', [
    mojo.internal.StructField('tabId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_CloseTabs_ParamsSpec.$, 'PageHandler_CloseTabs_Params', [
    mojo.internal.StructField('tabIds', 0, 0, mojo.internal.Array(mojo.internal.Int32, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_CloseWebUiTab_ParamsSpec.$, 'PageHandler_CloseWebUiTab_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetProfileData_ParamsSpec.$, 'PageHandler_GetProfileData_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetProfileData_ResponseParamsSpec.$, 'PageHandler_GetProfileData_ResponseParams', [
    mojo.internal.StructField('profileData', 0, 0, ProfileDataSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_GetIsSplit_ParamsSpec.$, 'PageHandler_GetIsSplit_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetIsSplit_ResponseParamsSpec.$, 'PageHandler_GetIsSplit_ResponseParams', [
    mojo.internal.StructField('isSplit', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_SwitchToTab_ParamsSpec.$, 'PageHandler_SwitchToTab_Params', [
    mojo.internal.StructField('switchToTabInfo', 0, 0, SwitchToTabInfoSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_OpenRecentlyClosedEntry_ParamsSpec.$, 'PageHandler_OpenRecentlyClosedEntry_Params', [
    mojo.internal.StructField('sessionId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_ReplaceActiveSplitTab_ParamsSpec.$, 'PageHandler_ReplaceActiveSplitTab_Params', [
    mojo.internal.StructField('replacementTabId', 0, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_SaveRecentlyClosedExpandedPref_ParamsSpec.$, 'PageHandler_SaveRecentlyClosedExpandedPref_Params', [
    mojo.internal.StructField('expanded', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_StartTabGroupTutorial_ParamsSpec.$, 'PageHandler_StartTabGroupTutorial_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_MaybeShowUI_ParamsSpec.$, 'PageHandler_MaybeShowUI_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetRangesIgnoringCaseAndAccents_ParamsSpec.$, 'PageHandler_GetRangesIgnoringCaseAndAccents_Params', [
    mojo.internal.StructField('searchText', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('targets', 8, 0, mojo.internal.Array(mojo.internal.String, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParamsSpec.$, 'PageHandler_GetRangesIgnoringCaseAndAccents_ResponseParams', [
    mojo.internal.StructField('ranges', 0, 0, mojo.internal.Array(mojo.internal.Array(TokenRangeSpec.$, false), false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(Page_HostWindowChanged_ParamsSpec.$, 'Page_HostWindowChanged_Params', [], [[0, 8],]);
mojo.internal.Struct(Page_TabsChanged_ParamsSpec.$, 'Page_TabsChanged_Params', [
    mojo.internal.StructField('profileTabs', 0, 0, ProfileDataSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(Page_TabUpdated_ParamsSpec.$, 'Page_TabUpdated_Params', [
    mojo.internal.StructField('tabUpdateInfo', 0, 0, TabUpdateInfoSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(Page_TabsRemoved_ParamsSpec.$, 'Page_TabsRemoved_Params', [
    mojo.internal.StructField('tabsRemovedInfo', 0, 0, TabsRemovedInfoSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(Page_TabUnsplit_ParamsSpec.$, 'Page_TabUnsplit_Params', [], [[0, 8],]);
export const browserProxyFactory = new MojoBrowserProxyFactory(PageHandlerRemote, PageCallbackRouter, (remote, receiver) => PageHandlerFactory.getRemote().createPageHandler(remote, receiver));
