//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/layers/PAPZInputBridgeParent.h"
#include "InputData.h"
#include "ipc/nsGUIEventIPC.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/layers/APZInputBridge.h"
#include "mozilla/layers/APZInputBridgeParent.h"
#include "mozilla/layers/KeyboardMap.h"
#include "mozilla/layers/ScrollableLayerGuid.h"


#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"

namespace mozilla {
namespace layers {


auto PAPZInputBridgeParent::ProcessingError(
        Result aCode,
        const char* aReason) -> void
{
}

auto PAPZInputBridgeParent::ShouldContinueFromReplyTimeout() -> bool
{
    return true;
}

MOZ_IMPLICIT PAPZInputBridgeParent::PAPZInputBridgeParent() :
    mozilla::ipc::IToplevelProtocol("PAPZInputBridgeParent", kProtocolId, mozilla::ipc::ParentSide)
{
    MOZ_COUNT_CTOR(PAPZInputBridgeParent);
}

PAPZInputBridgeParent::~PAPZInputBridgeParent()
{
    MOZ_COUNT_DTOR(PAPZInputBridgeParent);
}

auto PAPZInputBridgeParent::ActorAlloc() -> void
{
    MOZ_RELEASE_ASSERT(XRE_IsGPUProcess(), "Invalid process for `PAPZInputBridgeParent'");
    AddRef();
}

auto PAPZInputBridgeParent::ActorDealloc() -> void
{
    Release();
}

auto PAPZInputBridgeParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    return {};
}

auto PAPZInputBridgeParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    default:
        return nullptr;
    }
}

auto PAPZInputBridgeParent::SendCallInputBlockCallback(
        const uint64_t& aInputBlockId,
        const APZHandledResult& aHandledResult) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_CallInputBlockCallback(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aInputBlockId);
    // Sentinel = 'aInputBlockId'
    ((&(writer__)))->WriteSentinel(595657994);
    IPC::WriteParam((&(writer__)), aHandledResult);
    // Sentinel = 'aHandledResult'
    ((&(writer__)))->WriteSentinel(675153297);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_CallInputBlockCallback", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendHandleTap(
        const GeckoContentController_TapType& aType,
        const LayoutDevicePoint& point,
        const Modifiers& aModifiers,
        const ScrollableLayerGuid& aGuid,
        const uint64_t& aInputBlockId,
        const mozilla::Maybe<DoubleTapToZoomMetrics>& aDoubleTapToZoomMetrics) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_HandleTap(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aType);
    // Sentinel = 'aType'
    ((&(writer__)))->WriteSentinel(99222020);
    IPC::WriteParam((&(writer__)), point);
    // Sentinel = 'point'
    ((&(writer__)))->WriteSentinel(108790315);
    IPC::WriteParam((&(writer__)), aModifiers);
    // Sentinel = 'aModifiers'
    ((&(writer__)))->WriteSentinel(358286340);
    IPC::WriteParam((&(writer__)), aGuid);
    // Sentinel = 'aGuid'
    ((&(writer__)))->WriteSentinel(94044651);
    IPC::WriteParam((&(writer__)), aInputBlockId);
    // Sentinel = 'aInputBlockId'
    ((&(writer__)))->WriteSentinel(595657994);
    IPC::WriteParam((&(writer__)), aDoubleTapToZoomMetrics);
    // Sentinel = 'aDoubleTapToZoomMetrics'
    ((&(writer__)))->WriteSentinel(1803225377);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_HandleTap", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendNotifyPinchGesture(
        const PinchGestureType& aType,
        const ScrollableLayerGuid& aGuid,
        const LayoutDevicePoint& aFocusPoint,
        const LayoutDeviceCoord& aSpanChange,
        const Modifiers& aModifiers) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_NotifyPinchGesture(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aType);
    // Sentinel = 'aType'
    ((&(writer__)))->WriteSentinel(99222020);
    IPC::WriteParam((&(writer__)), aGuid);
    // Sentinel = 'aGuid'
    ((&(writer__)))->WriteSentinel(94044651);
    IPC::WriteParam((&(writer__)), aFocusPoint);
    // Sentinel = 'aFocusPoint'
    ((&(writer__)))->WriteSentinel(430769260);
    IPC::WriteParam((&(writer__)), aSpanChange);
    // Sentinel = 'aSpanChange'
    ((&(writer__)))->WriteSentinel(420021306);
    IPC::WriteParam((&(writer__)), aModifiers);
    // Sentinel = 'aModifiers'
    ((&(writer__)))->WriteSentinel(358286340);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_NotifyPinchGesture", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendCancelAutoscroll(const ViewID& aScrollId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_CancelAutoscroll(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aScrollId);
    // Sentinel = 'aScrollId'
    ((&(writer__)))->WriteSentinel(293602174);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_CancelAutoscroll", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendNotifyScaleGestureComplete(
        const ViewID& aScrollId,
        const float& aScale) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_NotifyScaleGestureComplete(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aScrollId);
    // Sentinel = 'aScrollId'
    ((&(writer__)))->WriteSentinel(293602174);
    IPC::WriteParam((&(writer__)), aScale);
    // Sentinel = 'aScale'
    ((&(writer__)))->WriteSentinel(131531338);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_NotifyScaleGestureComplete", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendLayerTransforms(mozilla::Span<MatrixMessage const> aTransforms) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_LayerTransforms(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTransforms);
    // Sentinel = 'aTransforms'
    ((&(writer__)))->WriteSentinel(446235793);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_LayerTransforms", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendUpdateOverscrollVelocity(
        const ScrollableLayerGuid& aGuid,
        const float& aX,
        const float& aY,
        const bool& aIsRootContent) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_UpdateOverscrollVelocity(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aGuid);
    // Sentinel = 'aGuid'
    ((&(writer__)))->WriteSentinel(94044651);
    IPC::WriteParam((&(writer__)), aX);
    // Sentinel = 'aX'
    ((&(writer__)))->WriteSentinel(18612410);
    IPC::WriteParam((&(writer__)), aY);
    // Sentinel = 'aY'
    ((&(writer__)))->WriteSentinel(18677947);
    IPC::WriteParam((&(writer__)), aIsRootContent);
    // Sentinel = 'aIsRootContent'
    ((&(writer__)))->WriteSentinel(683410845);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_UpdateOverscrollVelocity", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendUpdateOverscrollOffset(
        const ScrollableLayerGuid& aGuid,
        const float& aX,
        const float& aY,
        const bool& aIsRootContent) -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_UpdateOverscrollOffset(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aGuid);
    // Sentinel = 'aGuid'
    ((&(writer__)))->WriteSentinel(94044651);
    IPC::WriteParam((&(writer__)), aX);
    // Sentinel = 'aX'
    ((&(writer__)))->WriteSentinel(18612410);
    IPC::WriteParam((&(writer__)), aY);
    // Sentinel = 'aY'
    ((&(writer__)))->WriteSentinel(18677947);
    IPC::WriteParam((&(writer__)), aIsRootContent);
    // Sentinel = 'aIsRootContent'
    ((&(writer__)))->WriteSentinel(683410845);


    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_UpdateOverscrollOffset", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::SendHideDynamicToolbar() -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_HideDynamicToolbar(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZInputBridgeParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_HideDynamicToolbar", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PAPZInputBridgeParent::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PAPZInputBridgeParent::OnMessageReceived(const Message& msg__) -> PAPZInputBridgeParent::Result
{
    if (!CanSend()) {
        if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
            mozilla::ipc::LogMessageForProtocol(
                "PAPZInputBridgeParent",
                this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                "Ignored message for dead actor",
                (&(msg__))->type(),
                mozilla::ipc::MessageDirection::eSending);
        }
        return MsgProcessed;

    }
    switch (msg__.type()) {
    case PAPZInputBridge::Msg_UpdateWheelTransaction__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_UpdateWheelTransaction", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aRefPoint = IPC::ReadParam<LayoutDeviceIntPoint>((&(reader__)));
            if (!maybe__aRefPoint) {
                FatalError("Error deserializing 'LayoutDeviceIntPoint'");
                return MsgValueError;

            }
            auto& aRefPoint = *maybe__aRefPoint;
            // Sentinel = 'aRefPoint'
            if ((!(((&(reader__)))->ReadSentinel(285213577)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDeviceIntPoint'");
                return MsgValueError;
            }
            auto maybe__aEventMessage = IPC::ReadParam<EventMessage>((&(reader__)));
            if (!maybe__aEventMessage) {
                FatalError("Error deserializing 'EventMessage'");
                return MsgValueError;

            }
            auto& aEventMessage = *maybe__aEventMessage;
            // Sentinel = 'aEventMessage'
            if ((!(((&(reader__)))->ReadSentinel(596772137)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'EventMessage'");
                return MsgValueError;
            }
            auto maybe__aTargetGuid = IPC::ReadParam<mozilla::Maybe<ScrollableLayerGuid>>((&(reader__)));
            if (!maybe__aTargetGuid) {
                FatalError("Error deserializing 'ScrollableLayerGuid?'");
                return MsgValueError;

            }
            auto& aTargetGuid = *maybe__aTargetGuid;
            // Sentinel = 'aTargetGuid'
            if ((!(((&(reader__)))->ReadSentinel(429589586)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid?'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvUpdateWheelTransaction(std::move(aRefPoint), std::move(aEventMessage), std::move(aTargetGuid));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_SetKeyboardMap__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_SetKeyboardMap", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aKeyboardMap = IPC::ReadParam<KeyboardMap>((&(reader__)));
            if (!maybe__aKeyboardMap) {
                FatalError("Error deserializing 'KeyboardMap'");
                return MsgValueError;

            }
            auto& aKeyboardMap = *maybe__aKeyboardMap;
            // Sentinel = 'aKeyboardMap'
            if ((!(((&(reader__)))->ReadSentinel(507905201)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'KeyboardMap'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvSetKeyboardMap(std::move(aKeyboardMap));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_SetDPI__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_SetDPI", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aDpiValue = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aDpiValue) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aDpiValue = *maybe__aDpiValue;
            // Sentinel = 'aDpiValue'
            if ((!(((&(reader__)))->ReadSentinel(282919804)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvSetDPI(std::move(aDpiValue));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_SetBrowserGestureResponse__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_SetBrowserGestureResponse", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aInputBlockId = IPC::ReadParam<uint64_t>((&(reader__)));
            if (!maybe__aInputBlockId) {
                FatalError("Error deserializing 'uint64_t'");
                return MsgValueError;

            }
            auto& aInputBlockId = *maybe__aInputBlockId;
            // Sentinel = 'aInputBlockId'
            if ((!(((&(reader__)))->ReadSentinel(595657994)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            auto maybe__aResponse = IPC::ReadParam<BrowserGestureResponse>((&(reader__)));
            if (!maybe__aResponse) {
                FatalError("Error deserializing 'BrowserGestureResponse'");
                return MsgValueError;

            }
            auto& aResponse = *maybe__aResponse;
            // Sentinel = 'aResponse'
            if ((!(((&(reader__)))->ReadSentinel(301466545)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'BrowserGestureResponse'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvSetBrowserGestureResponse(std::move(aInputBlockId), std::move(aResponse));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_StartAutoscroll__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_StartAutoscroll", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aGuid = IPC::ReadParam<ScrollableLayerGuid>((&(reader__)));
            if (!maybe__aGuid) {
                FatalError("Error deserializing 'ScrollableLayerGuid'");
                return MsgValueError;

            }
            auto& aGuid = *maybe__aGuid;
            // Sentinel = 'aGuid'
            if ((!(((&(reader__)))->ReadSentinel(94044651)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'");
                return MsgValueError;
            }
            auto maybe__aAnchorLocation = IPC::ReadParam<ScreenPoint>((&(reader__)));
            if (!maybe__aAnchorLocation) {
                FatalError("Error deserializing 'ScreenPoint'");
                return MsgValueError;

            }
            auto& aAnchorLocation = *maybe__aAnchorLocation;
            // Sentinel = 'aAnchorLocation'
            if ((!(((&(reader__)))->ReadSentinel(776799734)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScreenPoint'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvStartAutoscroll(std::move(aGuid), std::move(aAnchorLocation));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_StopAutoscroll__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_StopAutoscroll", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aGuid = IPC::ReadParam<ScrollableLayerGuid>((&(reader__)));
            if (!maybe__aGuid) {
                FatalError("Error deserializing 'ScrollableLayerGuid'");
                return MsgValueError;

            }
            auto& aGuid = *maybe__aGuid;
            // Sentinel = 'aGuid'
            if ((!(((&(reader__)))->ReadSentinel(94044651)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvStopAutoscroll(std::move(aGuid));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_SetLongTapEnabled__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_SetLongTapEnabled", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aTapGestureEnabled = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aTapGestureEnabled) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aTapGestureEnabled = *maybe__aTapGestureEnabled;
            // Sentinel = 'aTapGestureEnabled'
            if ((!(((&(reader__)))->ReadSentinel(1116538641)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvSetLongTapEnabled(std::move(aTapGestureEnabled));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    case SHMEM_CREATED_MESSAGE_TYPE:
        {
            if (!ShmemCreated(msg__)) {
                return MsgPayloadError;
            }
            return MsgProcessed;
        }
    case SHMEM_DESTROYED_MESSAGE_TYPE:
        {
            if (!ShmemDestroyed(msg__)) {
                return MsgPayloadError;
            }
            return MsgProcessed;
        }
    }
}

auto PAPZInputBridgeParent::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PAPZInputBridgeParent::Result
{
    if (!CanSend()) {
        return MsgDropped;

    }
    switch (msg__.type()) {
    case PAPZInputBridge::Msg_ReceiveMultiTouchInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveMultiTouchInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<MultiTouchInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'MultiTouchInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MultiTouchInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            MultiTouchInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceiveMultiTouchInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceiveMultiTouchInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceiveMouseInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveMouseInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<MouseInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'MouseInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MouseInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            MouseInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceiveMouseInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceiveMouseInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceivePanGestureInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceivePanGestureInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<PanGestureInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'PanGestureInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'PanGestureInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            PanGestureInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceivePanGestureInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceivePanGestureInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceivePinchGestureInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceivePinchGestureInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<PinchGestureInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'PinchGestureInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'PinchGestureInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            PinchGestureInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceivePinchGestureInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceivePinchGestureInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceiveTapGestureInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveTapGestureInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<TapGestureInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'TapGestureInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TapGestureInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            TapGestureInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceiveTapGestureInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceiveTapGestureInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceiveScrollWheelInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveScrollWheelInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<ScrollWheelInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'ScrollWheelInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollWheelInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            ScrollWheelInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceiveScrollWheelInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceiveScrollWheelInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ReceiveKeyboardInputEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveKeyboardInputEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEvent = IPC::ReadParam<KeyboardInput>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'KeyboardInput'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'KeyboardInput'");
                return MsgValueError;
            }
            auto maybe__aWantsCallback = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aWantsCallback) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aWantsCallback = *maybe__aWantsCallback;
            // Sentinel = 'aWantsCallback'
            if ((!(((&(reader__)))->ReadSentinel(685704572)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            APZEventResult aOutResult{};
            KeyboardInput aOutEvent{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvReceiveKeyboardInputEvent(std::move(aEvent), std::move(aWantsCallback), (&(aOutResult)), (&(aOutEvent)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ReceiveKeyboardInputEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutResult);
            // Sentinel = 'aOutResult'
            ((&(writer__)))->WriteSentinel(365626393);
            IPC::WriteParam((&(writer__)), aOutEvent);
            // Sentinel = 'aOutEvent'
            ((&(writer__)))->WriteSentinel(293929884);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PAPZInputBridge::Msg_ProcessUnhandledEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ProcessUnhandledEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aRefPoint = IPC::ReadParam<LayoutDeviceIntPoint>((&(reader__)));
            if (!maybe__aRefPoint) {
                FatalError("Error deserializing 'LayoutDeviceIntPoint'");
                return MsgValueError;

            }
            auto& aRefPoint = *maybe__aRefPoint;
            // Sentinel = 'aRefPoint'
            if ((!(((&(reader__)))->ReadSentinel(285213577)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDeviceIntPoint'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
            LayoutDeviceIntPoint aOutRefPoint{};
            ScrollableLayerGuid aOutTargetGuid{};
            uint64_t aOutFocusSequenceNumber{};
            LayersId aOutLayersId{};
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::APZInputBridgeParent*>(this))->RecvProcessUnhandledEvent(std::move(aRefPoint), (&(aOutRefPoint)), (&(aOutTargetGuid)), (&(aOutFocusSequenceNumber)), (&(aOutLayersId)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PAPZInputBridge::Reply_ProcessUnhandledEvent(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), aOutRefPoint);
            // Sentinel = 'aOutRefPoint'
            ((&(writer__)))->WriteSentinel(506528961);
            IPC::WriteParam((&(writer__)), aOutTargetGuid);
            // Sentinel = 'aOutTargetGuid'
            ((&(writer__)))->WriteSentinel(691799434);
            IPC::WriteParam((&(writer__)), aOutFocusSequenceNumber);
            // Sentinel = 'aOutFocusSequenceNumber'
            ((&(writer__)))->WriteSentinel(1841105212);
            IPC::WriteParam((&(writer__)), aOutLayersId);
            // Sentinel = 'aOutLayersId'
            ((&(writer__)))->WriteSentinel(512754871);
            if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZInputBridgeParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}



} // namespace layers
} // namespace mozilla
