// chrome/browser/ui/webui/intro/sign_in_promo.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';
export class SignInPromoPageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'intro.mojom.SignInPromoPageHandlerFactory', scope);
    }
}
export class SignInPromoPageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(SignInPromoPageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createSignInPromoPageHandler(page, handler) {
        this.proxy.sendMessage(64761792, SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_ParamsSpec.$, null, [
            page,
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the SignInPromoPageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class SignInPromoPageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(64761792, SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_ParamsSpec.$, null, impl.createSignInPromoPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class SignInPromoPageHandlerFactory {
    static get $interfaceName() {
        return "intro.mojom.SignInPromoPageHandlerFactory";
    }
    /**
     * 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 SignInPromoPageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the SignInPromoPageHandlerFactory
 * 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 SignInPromoPageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createSignInPromoPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createSignInPromoPageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(64761792, SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_ParamsSpec.$, null, this.createSignInPromoPageHandler.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 SignInPromoPageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'intro.mojom.SignInPromoPageHandler', scope);
    }
}
export class SignInPromoPageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(SignInPromoPageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    getManagedDeviceDisclaimer() {
        return this.proxy.sendMessage(1906309897, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ParamsSpec.$, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParamsSpec.$, [], false);
    }
    continueWithAccount() {
        this.proxy.sendMessage(2073626929, SignInPromoPageHandler_ContinueWithAccount_ParamsSpec.$, null, [], false);
    }
    continueWithoutAccount() {
        this.proxy.sendMessage(1635946832, SignInPromoPageHandler_ContinueWithoutAccount_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the SignInPromoPageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class SignInPromoPageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1906309897, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ParamsSpec.$, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParamsSpec.$, impl.getManagedDeviceDisclaimer.bind(impl), false);
        this.helper_internal_.registerHandler(2073626929, SignInPromoPageHandler_ContinueWithAccount_ParamsSpec.$, null, impl.continueWithAccount.bind(impl), false);
        this.helper_internal_.registerHandler(1635946832, SignInPromoPageHandler_ContinueWithoutAccount_ParamsSpec.$, null, impl.continueWithoutAccount.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class SignInPromoPageHandler {
    static get $interfaceName() {
        return "intro.mojom.SignInPromoPageHandler";
    }
    /**
     * 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 SignInPromoPageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the SignInPromoPageHandler
 * 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 SignInPromoPageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    getManagedDeviceDisclaimer;
    continueWithAccount;
    continueWithoutAccount;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.getManagedDeviceDisclaimer =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1906309897, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ParamsSpec.$, SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParamsSpec.$, this.getManagedDeviceDisclaimer.createReceiverHandler(true /* expectsResponse */), false);
        this.continueWithAccount =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(2073626929, SignInPromoPageHandler_ContinueWithAccount_ParamsSpec.$, null, this.continueWithAccount.createReceiverHandler(false /* expectsResponse */), false);
        this.continueWithoutAccount =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1635946832, SignInPromoPageHandler_ContinueWithoutAccount_ParamsSpec.$, null, this.continueWithoutAccount.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 SignInPromoPagePendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'intro.mojom.SignInPromoPage', scope);
    }
}
export class SignInPromoPageRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(SignInPromoPagePendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    onResetButtons() {
        this.proxy.sendMessage(1102003968, SignInPromoPage_OnResetButtons_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the SignInPromoPage
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class SignInPromoPageReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1102003968, SignInPromoPage_OnResetButtons_ParamsSpec.$, null, impl.onResetButtons.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class SignInPromoPage {
    static get $interfaceName() {
        return "intro.mojom.SignInPromoPage";
    }
    /**
     * 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 SignInPromoPageRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the SignInPromoPage
 * 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 SignInPromoPageCallbackRouter {
    helper_internal_;
    $;
    router_;
    onResetButtons;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SignInPromoPageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.onResetButtons =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1102003968, SignInPromoPage_OnResetButtons_ParamsSpec.$, null, this.onResetButtons.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 SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_ParamsSpec = { $: {} };
export const SignInPromoPageHandler_GetManagedDeviceDisclaimer_ParamsSpec = { $: {} };
export const SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParamsSpec = { $: {} };
export const SignInPromoPageHandler_ContinueWithAccount_ParamsSpec = { $: {} };
export const SignInPromoPageHandler_ContinueWithoutAccount_ParamsSpec = { $: {} };
export const SignInPromoPage_OnResetButtons_ParamsSpec = { $: {} };
mojo.internal.Struct(SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_ParamsSpec.$, 'SignInPromoPageHandlerFactory_CreateSignInPromoPageHandler_Params', [
    mojo.internal.StructField('page', 0, 0, mojo.internal.InterfaceProxy(SignInPromoPageRemote), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('handler', 8, 0, mojo.internal.InterfaceRequest(SignInPromoPageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(SignInPromoPageHandler_GetManagedDeviceDisclaimer_ParamsSpec.$, 'SignInPromoPageHandler_GetManagedDeviceDisclaimer_Params', [], [[0, 8],]);
mojo.internal.Struct(SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParamsSpec.$, 'SignInPromoPageHandler_GetManagedDeviceDisclaimer_ResponseParams', [
    mojo.internal.StructField('disclaimer', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(SignInPromoPageHandler_ContinueWithAccount_ParamsSpec.$, 'SignInPromoPageHandler_ContinueWithAccount_Params', [], [[0, 8],]);
mojo.internal.Struct(SignInPromoPageHandler_ContinueWithoutAccount_ParamsSpec.$, 'SignInPromoPageHandler_ContinueWithoutAccount_Params', [], [[0, 8],]);
mojo.internal.Struct(SignInPromoPage_OnResetButtons_ParamsSpec.$, 'SignInPromoPage_OnResetButtons_Params', [], [[0, 8],]);
export const browserProxyFactory = new MojoBrowserProxyFactory(SignInPromoPageHandlerRemote, SignInPromoPageCallbackRouter, (remote, receiver) => SignInPromoPageHandlerFactory.getRemote().createSignInPromoPageHandler(remote, receiver));
