// chrome/browser/ui/webui/feature_showcase/google_lens.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 GoogleLensPageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'feature_showcase.mojom.GoogleLensPageHandler', scope);
    }
}
export class GoogleLensPageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(GoogleLensPageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    enableGoogleLens() {
        this.proxy.sendMessage(330850729, GoogleLensPageHandler_EnableGoogleLens_ParamsSpec.$, null, [], false);
    }
    skipGoogleLens() {
        this.proxy.sendMessage(1030669949, GoogleLensPageHandler_SkipGoogleLens_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the GoogleLensPageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class GoogleLensPageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(GoogleLensPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(330850729, GoogleLensPageHandler_EnableGoogleLens_ParamsSpec.$, null, impl.enableGoogleLens.bind(impl), false);
        this.helper_internal_.registerHandler(1030669949, GoogleLensPageHandler_SkipGoogleLens_ParamsSpec.$, null, impl.skipGoogleLens.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class GoogleLensPageHandler {
    static get $interfaceName() {
        return "feature_showcase.mojom.GoogleLensPageHandler";
    }
    /**
     * 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 GoogleLensPageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the GoogleLensPageHandler
 * 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 GoogleLensPageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    enableGoogleLens;
    skipGoogleLens;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(GoogleLensPageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.enableGoogleLens =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(330850729, GoogleLensPageHandler_EnableGoogleLens_ParamsSpec.$, null, this.enableGoogleLens.createReceiverHandler(false /* expectsResponse */), false);
        this.skipGoogleLens =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1030669949, GoogleLensPageHandler_SkipGoogleLens_ParamsSpec.$, null, this.skipGoogleLens.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 GoogleLensPageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'feature_showcase.mojom.GoogleLensPageHandlerFactory', scope);
    }
}
export class GoogleLensPageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(GoogleLensPageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createGoogleLensPageHandler(handler) {
        this.proxy.sendMessage(1543587171, GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_ParamsSpec.$, null, [
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the GoogleLensPageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class GoogleLensPageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(GoogleLensPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1543587171, GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_ParamsSpec.$, null, impl.createGoogleLensPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class GoogleLensPageHandlerFactory {
    static get $interfaceName() {
        return "feature_showcase.mojom.GoogleLensPageHandlerFactory";
    }
    /**
     * 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 GoogleLensPageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the GoogleLensPageHandlerFactory
 * 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 GoogleLensPageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createGoogleLensPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(GoogleLensPageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createGoogleLensPageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1543587171, GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_ParamsSpec.$, null, this.createGoogleLensPageHandler.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 GoogleLensPageHandler_EnableGoogleLens_ParamsSpec = { $: {} };
export const GoogleLensPageHandler_SkipGoogleLens_ParamsSpec = { $: {} };
export const GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_ParamsSpec = { $: {} };
mojo.internal.Struct(GoogleLensPageHandler_EnableGoogleLens_ParamsSpec.$, 'GoogleLensPageHandler_EnableGoogleLens_Params', [], [[0, 8],]);
mojo.internal.Struct(GoogleLensPageHandler_SkipGoogleLens_ParamsSpec.$, 'GoogleLensPageHandler_SkipGoogleLens_Params', [], [[0, 8],]);
mojo.internal.Struct(GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_ParamsSpec.$, 'GoogleLensPageHandlerFactory_CreateGoogleLensPageHandler_Params', [
    mojo.internal.StructField('handler', 0, 0, mojo.internal.InterfaceRequest(GoogleLensPageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
