// chrome/browser/ui/webui/subresource_filter/subresource_filter_internals.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 SubresourceFilterInternalsHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'subresource_filter.mojom.SubresourceFilterInternalsHandler', scope);
    }
}
export class SubresourceFilterInternalsHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(SubresourceFilterInternalsHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    getInternalsPageSettings() {
        return this.proxy.sendMessage(1192758527, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ParamsSpec.$, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParamsSpec.$, [], false);
    }
    setInternalsPageSettings(settings) {
        this.proxy.sendMessage(1719951741, SubresourceFilterInternalsHandler_SetInternalsPageSettings_ParamsSpec.$, null, [
            settings
        ], false);
    }
    observeInternalsPageSettings(observer) {
        this.proxy.sendMessage(1427149911, SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_ParamsSpec.$, null, [
            observer
        ], false);
    }
}
;
/**
 * An object which receives request messages for the SubresourceFilterInternalsHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class SubresourceFilterInternalsHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SubresourceFilterInternalsHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1192758527, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ParamsSpec.$, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParamsSpec.$, impl.getInternalsPageSettings.bind(impl), false);
        this.helper_internal_.registerHandler(1719951741, SubresourceFilterInternalsHandler_SetInternalsPageSettings_ParamsSpec.$, null, impl.setInternalsPageSettings.bind(impl), false);
        this.helper_internal_.registerHandler(1427149911, SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_ParamsSpec.$, null, impl.observeInternalsPageSettings.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class SubresourceFilterInternalsHandler {
    static get $interfaceName() {
        return "subresource_filter.mojom.SubresourceFilterInternalsHandler";
    }
    /**
     * 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 SubresourceFilterInternalsHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the SubresourceFilterInternalsHandler
 * 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 SubresourceFilterInternalsHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    getInternalsPageSettings;
    setInternalsPageSettings;
    observeInternalsPageSettings;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SubresourceFilterInternalsHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.getInternalsPageSettings =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1192758527, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ParamsSpec.$, SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParamsSpec.$, this.getInternalsPageSettings.createReceiverHandler(true /* expectsResponse */), false);
        this.setInternalsPageSettings =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1719951741, SubresourceFilterInternalsHandler_SetInternalsPageSettings_ParamsSpec.$, null, this.setInternalsPageSettings.createReceiverHandler(false /* expectsResponse */), false);
        this.observeInternalsPageSettings =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1427149911, SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_ParamsSpec.$, null, this.observeInternalsPageSettings.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 SubresourceFilterInternalsObserverPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'subresource_filter.mojom.SubresourceFilterInternalsObserver', scope);
    }
}
export class SubresourceFilterInternalsObserverRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(SubresourceFilterInternalsObserverPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    onInternalsPageSettingsChanged(settings) {
        this.proxy.sendMessage(1495450660, SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_ParamsSpec.$, null, [
            settings
        ], false);
    }
}
;
/**
 * An object which receives request messages for the SubresourceFilterInternalsObserver
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class SubresourceFilterInternalsObserverReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SubresourceFilterInternalsObserverRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1495450660, SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_ParamsSpec.$, null, impl.onInternalsPageSettingsChanged.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class SubresourceFilterInternalsObserver {
    static get $interfaceName() {
        return "subresource_filter.mojom.SubresourceFilterInternalsObserver";
    }
    /**
     * 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 SubresourceFilterInternalsObserverRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the SubresourceFilterInternalsObserver
 * 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 SubresourceFilterInternalsObserverCallbackRouter {
    helper_internal_;
    $;
    router_;
    onInternalsPageSettingsChanged;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(SubresourceFilterInternalsObserverRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.onInternalsPageSettingsChanged =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1495450660, SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_ParamsSpec.$, null, this.onInternalsPageSettingsChanged.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 SubresourceFilterInternalsPageSettingsSpec = { $: {} };
export const SubresourceFilterInternalsHandler_GetInternalsPageSettings_ParamsSpec = { $: {} };
export const SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParamsSpec = { $: {} };
export const SubresourceFilterInternalsHandler_SetInternalsPageSettings_ParamsSpec = { $: {} };
export const SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_ParamsSpec = { $: {} };
export const SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_ParamsSpec = { $: {} };
mojo.internal.Struct(SubresourceFilterInternalsPageSettingsSpec.$, 'SubresourceFilterInternalsPageSettings', [
    mojo.internal.StructField('shouldHighlightAds', 0, 0, mojo.internal.Bool, false, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(SubresourceFilterInternalsHandler_GetInternalsPageSettings_ParamsSpec.$, 'SubresourceFilterInternalsHandler_GetInternalsPageSettings_Params', [], [[0, 8],]);
mojo.internal.Struct(SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParamsSpec.$, 'SubresourceFilterInternalsHandler_GetInternalsPageSettings_ResponseParams', [
    mojo.internal.StructField('settings', 0, 0, SubresourceFilterInternalsPageSettingsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(SubresourceFilterInternalsHandler_SetInternalsPageSettings_ParamsSpec.$, 'SubresourceFilterInternalsHandler_SetInternalsPageSettings_Params', [
    mojo.internal.StructField('settings', 0, 0, SubresourceFilterInternalsPageSettingsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_ParamsSpec.$, 'SubresourceFilterInternalsHandler_ObserveInternalsPageSettings_Params', [
    mojo.internal.StructField('observer', 0, 0, mojo.internal.InterfaceProxy(SubresourceFilterInternalsObserverRemote), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_ParamsSpec.$, 'SubresourceFilterInternalsObserver_OnInternalsPageSettingsChanged_Params', [
    mojo.internal.StructField('settings', 0, 0, SubresourceFilterInternalsPageSettingsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
