// ui/webui/resources/cr_components/most_visited/most_visited.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 { TileSourceSpec as ntpTiles_mojom_TileSourceSpec } from '//resources/mojo/components/ntp_tiles/tile_source.mojom-webui.js';
import { TextDirectionSpec as mojoBase_mojom_TextDirectionSpec } from '//resources/mojo/mojo/public/mojom/base/text_direction.mojom-webui.js';
import { SkColorSpec as skia_mojom_SkColorSpec } from '//resources/mojo/skia/public/mojom/skcolor.mojom-webui.js';
import { UrlSpec as url_mojom_UrlSpec } from '//resources/mojo/url/mojom/url.mojom-webui.js';
export class MostVisitedPageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'most_visited.mojom.MostVisitedPageHandlerFactory', scope);
    }
}
export class MostVisitedPageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(MostVisitedPageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createPageHandler(page, handler) {
        this.proxy.sendMessage(54966545, MostVisitedPageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, [
            page,
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the MostVisitedPageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class MostVisitedPageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(54966545, MostVisitedPageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, impl.createPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class MostVisitedPageHandlerFactory {
    static get $interfaceName() {
        return "most_visited.mojom.MostVisitedPageHandlerFactory";
    }
    /**
     * 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 MostVisitedPageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the MostVisitedPageHandlerFactory
 * 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 MostVisitedPageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageHandlerFactoryRemote);
        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(54966545, MostVisitedPageHandlerFactory_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 MostVisitedPageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'most_visited.mojom.MostVisitedPageHandler', scope);
    }
}
export class MostVisitedPageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(MostVisitedPageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    addMostVisitedTile(url, title) {
        return this.proxy.sendMessage(299908884, MostVisitedPageHandler_AddMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_AddMostVisitedTile_ResponseParamsSpec.$, [
            url,
            title
        ], false);
    }
    deleteMostVisitedTile(tile) {
        this.proxy.sendMessage(1162078784, MostVisitedPageHandler_DeleteMostVisitedTile_ParamsSpec.$, null, [
            tile
        ], false);
    }
    reorderMostVisitedTile(tile, newPos) {
        this.proxy.sendMessage(1280373338, MostVisitedPageHandler_ReorderMostVisitedTile_ParamsSpec.$, null, [
            tile,
            newPos
        ], false);
    }
    restoreMostVisitedDefaults(source) {
        this.proxy.sendMessage(1689880718, MostVisitedPageHandler_RestoreMostVisitedDefaults_ParamsSpec.$, null, [
            source
        ], false);
    }
    undoMostVisitedAutoRemoval() {
        this.proxy.sendMessage(1684563294, MostVisitedPageHandler_UndoMostVisitedAutoRemoval_ParamsSpec.$, null, [], false);
    }
    undoMostVisitedTileAction(source) {
        this.proxy.sendMessage(300571039, MostVisitedPageHandler_UndoMostVisitedTileAction_ParamsSpec.$, null, [
            source
        ], false);
    }
    updateMostVisitedInfo() {
        this.proxy.sendMessage(690171603, MostVisitedPageHandler_UpdateMostVisitedInfo_ParamsSpec.$, null, [], false);
    }
    updateMostVisitedTile(tile, newUrl, newTitle) {
        return this.proxy.sendMessage(731141693, MostVisitedPageHandler_UpdateMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParamsSpec.$, [
            tile,
            newUrl,
            newTitle
        ], false);
    }
    prerenderMostVisitedTile(tile) {
        this.proxy.sendMessage(912058730, MostVisitedPageHandler_PrerenderMostVisitedTile_ParamsSpec.$, null, [
            tile
        ], false);
    }
    prefetchMostVisitedTile(tile) {
        this.proxy.sendMessage(1605037292, MostVisitedPageHandler_PrefetchMostVisitedTile_ParamsSpec.$, null, [
            tile
        ], false);
    }
    preconnectMostVisitedTile(tile) {
        this.proxy.sendMessage(143904922, MostVisitedPageHandler_PreconnectMostVisitedTile_ParamsSpec.$, null, [
            tile
        ], false);
    }
    cancelPrerender() {
        this.proxy.sendMessage(859749377, MostVisitedPageHandler_CancelPrerender_ParamsSpec.$, null, [], false);
    }
    getMostVisitedExpandedState() {
        return this.proxy.sendMessage(1561629447, MostVisitedPageHandler_GetMostVisitedExpandedState_ParamsSpec.$, MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParamsSpec.$, [], false);
    }
    setMostVisitedExpandedState(isExpanded) {
        this.proxy.sendMessage(1510400758, MostVisitedPageHandler_SetMostVisitedExpandedState_ParamsSpec.$, null, [
            isExpanded
        ], false);
    }
    onMostVisitedTilesRendered(tiles, time) {
        this.proxy.sendMessage(128620877, MostVisitedPageHandler_OnMostVisitedTilesRendered_ParamsSpec.$, null, [
            tiles,
            time
        ], false);
    }
    onMostVisitedTileNavigation(tile, index, mouseButton, altKey, ctrlKey, metaKey, shiftKey) {
        this.proxy.sendMessage(278825033, MostVisitedPageHandler_OnMostVisitedTileNavigation_ParamsSpec.$, null, [
            tile,
            index,
            mouseButton,
            altKey,
            ctrlKey,
            metaKey,
            shiftKey
        ], false);
    }
}
;
/**
 * An object which receives request messages for the MostVisitedPageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class MostVisitedPageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(299908884, MostVisitedPageHandler_AddMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_AddMostVisitedTile_ResponseParamsSpec.$, impl.addMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(1162078784, MostVisitedPageHandler_DeleteMostVisitedTile_ParamsSpec.$, null, impl.deleteMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(1280373338, MostVisitedPageHandler_ReorderMostVisitedTile_ParamsSpec.$, null, impl.reorderMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(1689880718, MostVisitedPageHandler_RestoreMostVisitedDefaults_ParamsSpec.$, null, impl.restoreMostVisitedDefaults.bind(impl), false);
        this.helper_internal_.registerHandler(1684563294, MostVisitedPageHandler_UndoMostVisitedAutoRemoval_ParamsSpec.$, null, impl.undoMostVisitedAutoRemoval.bind(impl), false);
        this.helper_internal_.registerHandler(300571039, MostVisitedPageHandler_UndoMostVisitedTileAction_ParamsSpec.$, null, impl.undoMostVisitedTileAction.bind(impl), false);
        this.helper_internal_.registerHandler(690171603, MostVisitedPageHandler_UpdateMostVisitedInfo_ParamsSpec.$, null, impl.updateMostVisitedInfo.bind(impl), false);
        this.helper_internal_.registerHandler(731141693, MostVisitedPageHandler_UpdateMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParamsSpec.$, impl.updateMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(912058730, MostVisitedPageHandler_PrerenderMostVisitedTile_ParamsSpec.$, null, impl.prerenderMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(1605037292, MostVisitedPageHandler_PrefetchMostVisitedTile_ParamsSpec.$, null, impl.prefetchMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(143904922, MostVisitedPageHandler_PreconnectMostVisitedTile_ParamsSpec.$, null, impl.preconnectMostVisitedTile.bind(impl), false);
        this.helper_internal_.registerHandler(859749377, MostVisitedPageHandler_CancelPrerender_ParamsSpec.$, null, impl.cancelPrerender.bind(impl), false);
        this.helper_internal_.registerHandler(1561629447, MostVisitedPageHandler_GetMostVisitedExpandedState_ParamsSpec.$, MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParamsSpec.$, impl.getMostVisitedExpandedState.bind(impl), false);
        this.helper_internal_.registerHandler(1510400758, MostVisitedPageHandler_SetMostVisitedExpandedState_ParamsSpec.$, null, impl.setMostVisitedExpandedState.bind(impl), false);
        this.helper_internal_.registerHandler(128620877, MostVisitedPageHandler_OnMostVisitedTilesRendered_ParamsSpec.$, null, impl.onMostVisitedTilesRendered.bind(impl), false);
        this.helper_internal_.registerHandler(278825033, MostVisitedPageHandler_OnMostVisitedTileNavigation_ParamsSpec.$, null, impl.onMostVisitedTileNavigation.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class MostVisitedPageHandler {
    static get $interfaceName() {
        return "most_visited.mojom.MostVisitedPageHandler";
    }
    /**
     * 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 MostVisitedPageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the MostVisitedPageHandler
 * 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 MostVisitedPageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    addMostVisitedTile;
    deleteMostVisitedTile;
    reorderMostVisitedTile;
    restoreMostVisitedDefaults;
    undoMostVisitedAutoRemoval;
    undoMostVisitedTileAction;
    updateMostVisitedInfo;
    updateMostVisitedTile;
    prerenderMostVisitedTile;
    prefetchMostVisitedTile;
    preconnectMostVisitedTile;
    cancelPrerender;
    getMostVisitedExpandedState;
    setMostVisitedExpandedState;
    onMostVisitedTilesRendered;
    onMostVisitedTileNavigation;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.addMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(299908884, MostVisitedPageHandler_AddMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_AddMostVisitedTile_ResponseParamsSpec.$, this.addMostVisitedTile.createReceiverHandler(true /* expectsResponse */), false);
        this.deleteMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1162078784, MostVisitedPageHandler_DeleteMostVisitedTile_ParamsSpec.$, null, this.deleteMostVisitedTile.createReceiverHandler(false /* expectsResponse */), false);
        this.reorderMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1280373338, MostVisitedPageHandler_ReorderMostVisitedTile_ParamsSpec.$, null, this.reorderMostVisitedTile.createReceiverHandler(false /* expectsResponse */), false);
        this.restoreMostVisitedDefaults =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1689880718, MostVisitedPageHandler_RestoreMostVisitedDefaults_ParamsSpec.$, null, this.restoreMostVisitedDefaults.createReceiverHandler(false /* expectsResponse */), false);
        this.undoMostVisitedAutoRemoval =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1684563294, MostVisitedPageHandler_UndoMostVisitedAutoRemoval_ParamsSpec.$, null, this.undoMostVisitedAutoRemoval.createReceiverHandler(false /* expectsResponse */), false);
        this.undoMostVisitedTileAction =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(300571039, MostVisitedPageHandler_UndoMostVisitedTileAction_ParamsSpec.$, null, this.undoMostVisitedTileAction.createReceiverHandler(false /* expectsResponse */), false);
        this.updateMostVisitedInfo =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(690171603, MostVisitedPageHandler_UpdateMostVisitedInfo_ParamsSpec.$, null, this.updateMostVisitedInfo.createReceiverHandler(false /* expectsResponse */), false);
        this.updateMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(731141693, MostVisitedPageHandler_UpdateMostVisitedTile_ParamsSpec.$, MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParamsSpec.$, this.updateMostVisitedTile.createReceiverHandler(true /* expectsResponse */), false);
        this.prerenderMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(912058730, MostVisitedPageHandler_PrerenderMostVisitedTile_ParamsSpec.$, null, this.prerenderMostVisitedTile.createReceiverHandler(false /* expectsResponse */), false);
        this.prefetchMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1605037292, MostVisitedPageHandler_PrefetchMostVisitedTile_ParamsSpec.$, null, this.prefetchMostVisitedTile.createReceiverHandler(false /* expectsResponse */), false);
        this.preconnectMostVisitedTile =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(143904922, MostVisitedPageHandler_PreconnectMostVisitedTile_ParamsSpec.$, null, this.preconnectMostVisitedTile.createReceiverHandler(false /* expectsResponse */), false);
        this.cancelPrerender =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(859749377, MostVisitedPageHandler_CancelPrerender_ParamsSpec.$, null, this.cancelPrerender.createReceiverHandler(false /* expectsResponse */), false);
        this.getMostVisitedExpandedState =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1561629447, MostVisitedPageHandler_GetMostVisitedExpandedState_ParamsSpec.$, MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParamsSpec.$, this.getMostVisitedExpandedState.createReceiverHandler(true /* expectsResponse */), false);
        this.setMostVisitedExpandedState =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1510400758, MostVisitedPageHandler_SetMostVisitedExpandedState_ParamsSpec.$, null, this.setMostVisitedExpandedState.createReceiverHandler(false /* expectsResponse */), false);
        this.onMostVisitedTilesRendered =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(128620877, MostVisitedPageHandler_OnMostVisitedTilesRendered_ParamsSpec.$, null, this.onMostVisitedTilesRendered.createReceiverHandler(false /* expectsResponse */), false);
        this.onMostVisitedTileNavigation =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(278825033, MostVisitedPageHandler_OnMostVisitedTileNavigation_ParamsSpec.$, null, this.onMostVisitedTileNavigation.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 MostVisitedPagePendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'most_visited.mojom.MostVisitedPage', scope);
    }
}
export class MostVisitedPageRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(MostVisitedPagePendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    setMostVisitedInfo(info) {
        this.proxy.sendMessage(1193345317, MostVisitedPage_SetMostVisitedInfo_ParamsSpec.$, null, [
            info
        ], false);
    }
    onMostVisitedTilesAutoRemoval() {
        this.proxy.sendMessage(1544156039, MostVisitedPage_OnMostVisitedTilesAutoRemoval_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the MostVisitedPage
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class MostVisitedPageReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1193345317, MostVisitedPage_SetMostVisitedInfo_ParamsSpec.$, null, impl.setMostVisitedInfo.bind(impl), false);
        this.helper_internal_.registerHandler(1544156039, MostVisitedPage_OnMostVisitedTilesAutoRemoval_ParamsSpec.$, null, impl.onMostVisitedTilesAutoRemoval.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class MostVisitedPage {
    static get $interfaceName() {
        return "most_visited.mojom.MostVisitedPage";
    }
    /**
     * 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 MostVisitedPageRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the MostVisitedPage
 * 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 MostVisitedPageCallbackRouter {
    helper_internal_;
    $;
    router_;
    setMostVisitedInfo;
    onMostVisitedTilesAutoRemoval;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(MostVisitedPageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.setMostVisitedInfo =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1193345317, MostVisitedPage_SetMostVisitedInfo_ParamsSpec.$, null, this.setMostVisitedInfo.createReceiverHandler(false /* expectsResponse */), false);
        this.onMostVisitedTilesAutoRemoval =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1544156039, MostVisitedPage_OnMostVisitedTilesAutoRemoval_ParamsSpec.$, null, this.onMostVisitedTilesAutoRemoval.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 MostVisitedTileSpec = { $: {} };
export const MostVisitedThemeSpec = { $: {} };
export const MostVisitedInfoSpec = { $: {} };
export const MostVisitedPageHandlerFactory_CreatePageHandler_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_AddMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_AddMostVisitedTile_ResponseParamsSpec = { $: {} };
export const MostVisitedPageHandler_DeleteMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_ReorderMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_RestoreMostVisitedDefaults_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_UndoMostVisitedAutoRemoval_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_UndoMostVisitedTileAction_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_UpdateMostVisitedInfo_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_UpdateMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParamsSpec = { $: {} };
export const MostVisitedPageHandler_PrerenderMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_PrefetchMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_PreconnectMostVisitedTile_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_CancelPrerender_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_GetMostVisitedExpandedState_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParamsSpec = { $: {} };
export const MostVisitedPageHandler_SetMostVisitedExpandedState_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_OnMostVisitedTilesRendered_ParamsSpec = { $: {} };
export const MostVisitedPageHandler_OnMostVisitedTileNavigation_ParamsSpec = { $: {} };
export const MostVisitedPage_SetMostVisitedInfo_ParamsSpec = { $: {} };
export const MostVisitedPage_OnMostVisitedTilesAutoRemoval_ParamsSpec = { $: {} };
mojo.internal.Struct(MostVisitedTileSpec.$, 'MostVisitedTile', [
    mojo.internal.StructField('title', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('titleDirection', 8, 0, mojoBase_mojom_TextDirectionSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('url', 16, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('isQueryTile', 12, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('allowUserEdit', 12, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('allowUserDelete', 12, 2, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('source', 24, 0, ntpTiles_mojom_TileSourceSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('titleSource', 28, 0, mojo.internal.Int32, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 40],]);
mojo.internal.Struct(MostVisitedThemeSpec.$, 'MostVisitedTheme', [
    mojo.internal.StructField('backgroundColor', 0, 0, skia_mojom_SkColorSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('useWhiteTileIcon', 8, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('isDark', 8, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedInfoSpec.$, 'MostVisitedInfo', [
    mojo.internal.StructField('customLinksEnabled', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('enterpriseShortcutsEnabled', 0, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('visible', 0, 2, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('tiles', 8, 0, mojo.internal.Array(MostVisitedTileSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPageHandlerFactory_CreatePageHandler_ParamsSpec.$, 'MostVisitedPageHandlerFactory_CreatePageHandler_Params', [
    mojo.internal.StructField('page', 0, 0, mojo.internal.InterfaceProxy(MostVisitedPageRemote), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('handler', 8, 0, mojo.internal.InterfaceRequest(MostVisitedPageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPageHandler_AddMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_AddMostVisitedTile_Params', [
    mojo.internal.StructField('url', 0, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('title', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPageHandler_AddMostVisitedTile_ResponseParamsSpec.$, 'MostVisitedPageHandler_AddMostVisitedTile_ResponseParams', [
    mojo.internal.StructField('success', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_DeleteMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_DeleteMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_ReorderMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_ReorderMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('newPos', 8, 0, mojo.internal.Uint8, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPageHandler_RestoreMostVisitedDefaults_ParamsSpec.$, 'MostVisitedPageHandler_RestoreMostVisitedDefaults_Params', [
    mojo.internal.StructField('source', 0, 0, ntpTiles_mojom_TileSourceSpec.$, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_UndoMostVisitedAutoRemoval_ParamsSpec.$, 'MostVisitedPageHandler_UndoMostVisitedAutoRemoval_Params', [], [[0, 8],]);
mojo.internal.Struct(MostVisitedPageHandler_UndoMostVisitedTileAction_ParamsSpec.$, 'MostVisitedPageHandler_UndoMostVisitedTileAction_Params', [
    mojo.internal.StructField('source', 0, 0, ntpTiles_mojom_TileSourceSpec.$, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_UpdateMostVisitedInfo_ParamsSpec.$, 'MostVisitedPageHandler_UpdateMostVisitedInfo_Params', [], [[0, 8],]);
mojo.internal.Struct(MostVisitedPageHandler_UpdateMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_UpdateMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('newUrl', 8, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('newTitle', 16, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParamsSpec.$, 'MostVisitedPageHandler_UpdateMostVisitedTile_ResponseParams', [
    mojo.internal.StructField('success', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_PrerenderMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_PrerenderMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_PrefetchMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_PrefetchMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_PreconnectMostVisitedTile_ParamsSpec.$, 'MostVisitedPageHandler_PreconnectMostVisitedTile_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_CancelPrerender_ParamsSpec.$, 'MostVisitedPageHandler_CancelPrerender_Params', [], [[0, 8],]);
mojo.internal.Struct(MostVisitedPageHandler_GetMostVisitedExpandedState_ParamsSpec.$, 'MostVisitedPageHandler_GetMostVisitedExpandedState_Params', [], [[0, 8],]);
mojo.internal.Struct(MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParamsSpec.$, 'MostVisitedPageHandler_GetMostVisitedExpandedState_ResponseParams', [
    mojo.internal.StructField('isExpanded', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_SetMostVisitedExpandedState_ParamsSpec.$, 'MostVisitedPageHandler_SetMostVisitedExpandedState_Params', [
    mojo.internal.StructField('isExpanded', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPageHandler_OnMostVisitedTilesRendered_ParamsSpec.$, 'MostVisitedPageHandler_OnMostVisitedTilesRendered_Params', [
    mojo.internal.StructField('tiles', 0, 0, mojo.internal.Array(MostVisitedTileSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('time', 8, 0, mojo.internal.Double, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPageHandler_OnMostVisitedTileNavigation_ParamsSpec.$, 'MostVisitedPageHandler_OnMostVisitedTileNavigation_Params', [
    mojo.internal.StructField('tile', 0, 0, MostVisitedTileSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('index', 8, 0, mojo.internal.Uint32, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('mouseButton', 12, 0, mojo.internal.Uint8, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('altKey', 13, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('ctrlKey', 13, 1, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('metaKey', 13, 2, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('shiftKey', 13, 3, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(MostVisitedPage_SetMostVisitedInfo_ParamsSpec.$, 'MostVisitedPage_SetMostVisitedInfo_Params', [
    mojo.internal.StructField('info', 0, 0, MostVisitedInfoSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(MostVisitedPage_OnMostVisitedTilesAutoRemoval_ParamsSpec.$, 'MostVisitedPage_OnMostVisitedTilesAutoRemoval_Params', [], [[0, 8],]);
export const browserProxyFactory = new MojoBrowserProxyFactory(MostVisitedPageHandlerRemote, MostVisitedPageCallbackRouter, (remote, receiver) => MostVisitedPageHandlerFactory.getRemote().createPageHandler(remote, receiver));
