// chrome/browser/ui/webui/intro/finish_or_continue.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 FinishOrContinuePageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'intro.mojom.FinishOrContinuePageHandlerFactory', scope);
    }
}
export class FinishOrContinuePageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(FinishOrContinuePageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createFinishOrContinuePageHandler(handler) {
        this.proxy.sendMessage(1320109197, FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_ParamsSpec.$, null, [
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the FinishOrContinuePageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class FinishOrContinuePageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(FinishOrContinuePageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1320109197, FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_ParamsSpec.$, null, impl.createFinishOrContinuePageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class FinishOrContinuePageHandlerFactory {
    static get $interfaceName() {
        return "intro.mojom.FinishOrContinuePageHandlerFactory";
    }
    /**
     * 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 FinishOrContinuePageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the FinishOrContinuePageHandlerFactory
 * 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 FinishOrContinuePageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createFinishOrContinuePageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(FinishOrContinuePageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createFinishOrContinuePageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1320109197, FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_ParamsSpec.$, null, this.createFinishOrContinuePageHandler.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 FinishOrContinuePageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'intro.mojom.FinishOrContinuePageHandler', scope);
    }
}
export class FinishOrContinuePageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(FinishOrContinuePageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    startBrowsing() {
        this.proxy.sendMessage(176234734, FinishOrContinuePageHandler_StartBrowsing_ParamsSpec.$, null, [], false);
    }
    continueEducation() {
        this.proxy.sendMessage(1521981038, FinishOrContinuePageHandler_ContinueEducation_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the FinishOrContinuePageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class FinishOrContinuePageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(FinishOrContinuePageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(176234734, FinishOrContinuePageHandler_StartBrowsing_ParamsSpec.$, null, impl.startBrowsing.bind(impl), false);
        this.helper_internal_.registerHandler(1521981038, FinishOrContinuePageHandler_ContinueEducation_ParamsSpec.$, null, impl.continueEducation.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class FinishOrContinuePageHandler {
    static get $interfaceName() {
        return "intro.mojom.FinishOrContinuePageHandler";
    }
    /**
     * 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 FinishOrContinuePageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the FinishOrContinuePageHandler
 * 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 FinishOrContinuePageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    startBrowsing;
    continueEducation;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(FinishOrContinuePageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.startBrowsing =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(176234734, FinishOrContinuePageHandler_StartBrowsing_ParamsSpec.$, null, this.startBrowsing.createReceiverHandler(false /* expectsResponse */), false);
        this.continueEducation =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1521981038, FinishOrContinuePageHandler_ContinueEducation_ParamsSpec.$, null, this.continueEducation.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 FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_ParamsSpec = { $: {} };
export const FinishOrContinuePageHandler_StartBrowsing_ParamsSpec = { $: {} };
export const FinishOrContinuePageHandler_ContinueEducation_ParamsSpec = { $: {} };
mojo.internal.Struct(FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_ParamsSpec.$, 'FinishOrContinuePageHandlerFactory_CreateFinishOrContinuePageHandler_Params', [
    mojo.internal.StructField('handler', 0, 0, mojo.internal.InterfaceRequest(FinishOrContinuePageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(FinishOrContinuePageHandler_StartBrowsing_ParamsSpec.$, 'FinishOrContinuePageHandler_StartBrowsing_Params', [], [[0, 8],]);
mojo.internal.Struct(FinishOrContinuePageHandler_ContinueEducation_ParamsSpec.$, 'FinishOrContinuePageHandler_ContinueEducation_Params', [], [[0, 8],]);
