// chrome/browser/ui/webui/feature_showcase/themes_and_customization.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';
export class ThemesAndCustomizationPageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'feature_showcase.mojom.ThemesAndCustomizationPageHandler', scope);
    }
}
export class ThemesAndCustomizationPageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(ThemesAndCustomizationPageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    snapshotTheme() {
        this.proxy.sendMessage(243812714, ThemesAndCustomizationPageHandler_SnapshotTheme_ParamsSpec.$, null, [], false);
    }
    acceptTheme() {
        this.proxy.sendMessage(590849951, ThemesAndCustomizationPageHandler_AcceptTheme_ParamsSpec.$, null, [], false);
    }
    revertTheme() {
        this.proxy.sendMessage(1583439550, ThemesAndCustomizationPageHandler_RevertTheme_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the ThemesAndCustomizationPageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class ThemesAndCustomizationPageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(ThemesAndCustomizationPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(243812714, ThemesAndCustomizationPageHandler_SnapshotTheme_ParamsSpec.$, null, impl.snapshotTheme.bind(impl), false);
        this.helper_internal_.registerHandler(590849951, ThemesAndCustomizationPageHandler_AcceptTheme_ParamsSpec.$, null, impl.acceptTheme.bind(impl), false);
        this.helper_internal_.registerHandler(1583439550, ThemesAndCustomizationPageHandler_RevertTheme_ParamsSpec.$, null, impl.revertTheme.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class ThemesAndCustomizationPageHandler {
    static get $interfaceName() {
        return "feature_showcase.mojom.ThemesAndCustomizationPageHandler";
    }
    /**
     * 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 ThemesAndCustomizationPageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the ThemesAndCustomizationPageHandler
 * 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 ThemesAndCustomizationPageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    snapshotTheme;
    acceptTheme;
    revertTheme;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(ThemesAndCustomizationPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.snapshotTheme =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(243812714, ThemesAndCustomizationPageHandler_SnapshotTheme_ParamsSpec.$, null, this.snapshotTheme.createReceiverHandler(false /* expectsResponse */), false);
        this.acceptTheme =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(590849951, ThemesAndCustomizationPageHandler_AcceptTheme_ParamsSpec.$, null, this.acceptTheme.createReceiverHandler(false /* expectsResponse */), false);
        this.revertTheme =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1583439550, ThemesAndCustomizationPageHandler_RevertTheme_ParamsSpec.$, null, this.revertTheme.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 ThemesAndCustomizationPageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'feature_showcase.mojom.ThemesAndCustomizationPageHandlerFactory', scope);
    }
}
export class ThemesAndCustomizationPageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(ThemesAndCustomizationPageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createThemesAndCustomizationPageHandler(handler) {
        this.proxy.sendMessage(258471992, ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_ParamsSpec.$, null, [
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the ThemesAndCustomizationPageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class ThemesAndCustomizationPageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(ThemesAndCustomizationPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(258471992, ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_ParamsSpec.$, null, impl.createThemesAndCustomizationPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class ThemesAndCustomizationPageHandlerFactory {
    static get $interfaceName() {
        return "feature_showcase.mojom.ThemesAndCustomizationPageHandlerFactory";
    }
    /**
     * 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 ThemesAndCustomizationPageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the ThemesAndCustomizationPageHandlerFactory
 * 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 ThemesAndCustomizationPageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createThemesAndCustomizationPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(ThemesAndCustomizationPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createThemesAndCustomizationPageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(258471992, ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_ParamsSpec.$, null, this.createThemesAndCustomizationPageHandler.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 ThemesAndCustomizationPageHandler_SnapshotTheme_ParamsSpec = { $: {} };
export const ThemesAndCustomizationPageHandler_AcceptTheme_ParamsSpec = { $: {} };
export const ThemesAndCustomizationPageHandler_RevertTheme_ParamsSpec = { $: {} };
export const ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_ParamsSpec = { $: {} };
mojo.internal.Struct(ThemesAndCustomizationPageHandler_SnapshotTheme_ParamsSpec.$, 'ThemesAndCustomizationPageHandler_SnapshotTheme_Params', [], [[0, 8],]);
mojo.internal.Struct(ThemesAndCustomizationPageHandler_AcceptTheme_ParamsSpec.$, 'ThemesAndCustomizationPageHandler_AcceptTheme_Params', [], [[0, 8],]);
mojo.internal.Struct(ThemesAndCustomizationPageHandler_RevertTheme_ParamsSpec.$, 'ThemesAndCustomizationPageHandler_RevertTheme_Params', [], [[0, 8],]);
mojo.internal.Struct(ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_ParamsSpec.$, 'ThemesAndCustomizationPageHandlerFactory_CreateThemesAndCustomizationPageHandler_Params', [
    mojo.internal.StructField('handler', 0, 0, mojo.internal.InterfaceRequest(ThemesAndCustomizationPageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
