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


#include "mozilla/layers/PAPZChild.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/layers/APZChild.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/layers/RemoteContentController.h"
#include "mozilla/layers/RepaintRequest.h"
#include "mozilla/layers/ScrollableLayerGuid.h"
#include "nsRegion.h"

#include "mozilla/layers/PCompositorBridgeChild.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 {


MOZ_IMPLICIT PAPZChild::PAPZChild() :
    mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PAPZChild);
}

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

auto PAPZChild::ActorAlloc() -> void
{
}

auto PAPZChild::ActorDealloc() -> void
{
    if (Manager()) {
        Manager()->DeallocManagee(kProtocolId, this);
    }
}

auto PAPZChild::OtherPid() const -> ::base::ProcessId
{
    ::base::ProcessId pid =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
    MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
    return pid;
}

auto PAPZChild::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

auto PAPZChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
    return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}

auto PAPZChild::Manager() const -> PCompositorBridgeChild*
{
    return static_cast<PCompositorBridgeChild*>(IProtocol::Manager());
}

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

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

auto PAPZChild::Send__delete__(PAPZChild* actor) -> bool
{
    if (!actor || !actor->CanSend()) {
        NS_WARNING("Attempt to __delete__ missing or closed actor");
        return false;
    }
    UniquePtr<IPC::Message> msg__ = PAPZ::Msg___delete__((actor)->Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            actor};


    if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZChild",
            actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZ::Msg___delete__", OTHER);

    bool sendok__ = (actor)->ChannelSend(std::move(msg__));

    actor->ActorDisconnected(Deletion);
    return sendok__;
}

auto PAPZChild::SendDestroy() -> bool
{
    UniquePtr<IPC::Message> msg__ = PAPZ::Msg_Destroy(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PAPZChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PAPZ::Msg_Destroy", OTHER);

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

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

auto PAPZChild::OnMessageReceived(const Message& msg__) -> PAPZChild::Result
{
    switch (msg__.type()) {
    case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            return MsgProcessed;
        }
    case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            this->ActorDisconnected(ManagedEndpointDropped);
            return MsgProcessed;
        }
    case PAPZ::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    case PAPZ::Msg_LayerTransforms__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_LayerTransforms", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aTransforms = IPC::ReadParam<nsTArray<MatrixMessage>>((&(reader__)));
            if (!maybe__aTransforms) {
                FatalError("Error deserializing 'MatrixMessage[]'");
                return MsgValueError;

            }
            auto& aTransforms = *maybe__aTransforms;
            // Sentinel = 'aTransforms'
            if ((!(((&(reader__)))->ReadSentinel(446235793)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MatrixMessage[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvLayerTransforms(std::move(aTransforms));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_RequestContentRepaint__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_RequestContentRepaint", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& request = *maybe__request;
            // Sentinel = 'request'
            if ((!(((&(reader__)))->ReadSentinel(202703626)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'RepaintRequest'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvRequestContentRepaint(std::move(request));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_UpdateOverscrollVelocity__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollVelocity", 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__aX = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aX) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aX = *maybe__aX;
            // Sentinel = 'aX'
            if ((!(((&(reader__)))->ReadSentinel(18612410)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            auto maybe__aY = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aY) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aY = *maybe__aY;
            // Sentinel = 'aY'
            if ((!(((&(reader__)))->ReadSentinel(18677947)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            auto maybe__aIsRootContent = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aIsRootContent) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aIsRootContent = *maybe__aIsRootContent;
            // Sentinel = 'aIsRootContent'
            if ((!(((&(reader__)))->ReadSentinel(683410845)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvUpdateOverscrollVelocity(std::move(aGuid), std::move(aX), std::move(aY), std::move(aIsRootContent));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_UpdateOverscrollOffset__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollOffset", 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__aX = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aX) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aX = *maybe__aX;
            // Sentinel = 'aX'
            if ((!(((&(reader__)))->ReadSentinel(18612410)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            auto maybe__aY = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aY) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aY = *maybe__aY;
            // Sentinel = 'aY'
            if ((!(((&(reader__)))->ReadSentinel(18677947)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            auto maybe__aIsRootContent = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aIsRootContent) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aIsRootContent = *maybe__aIsRootContent;
            // Sentinel = 'aIsRootContent'
            if ((!(((&(reader__)))->ReadSentinel(683410845)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvUpdateOverscrollOffset(std::move(aGuid), std::move(aX), std::move(aY), std::move(aIsRootContent));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_HideDynamicToolbar__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_HideDynamicToolbar", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvHideDynamicToolbar();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyMozMouseScrollEvent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyMozMouseScrollEvent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aScrollId = *maybe__aScrollId;
            // Sentinel = 'aScrollId'
            if ((!(((&(reader__)))->ReadSentinel(293602174)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
                return MsgValueError;
            }
            auto maybe__aEvent = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__aEvent) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& aEvent = *maybe__aEvent;
            // Sentinel = 'aEvent'
            if ((!(((&(reader__)))->ReadSentinel(133956196)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyMozMouseScrollEvent(std::move(aScrollId), std::move(aEvent));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyAPZStateChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAPZStateChange", 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__aChange = IPC::ReadParam<GeckoContentController_APZStateChange>((&(reader__)));
            if (!maybe__aChange) {
                FatalError("Error deserializing 'GeckoContentController_APZStateChange'");
                return MsgValueError;

            }
            auto& aChange = *maybe__aChange;
            // Sentinel = 'aChange'
            if ((!(((&(reader__)))->ReadSentinel(172556968)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'GeckoContentController_APZStateChange'");
                return MsgValueError;
            }
            auto maybe__aArg = IPC::ReadParam<int>((&(reader__)));
            if (!maybe__aArg) {
                FatalError("Error deserializing 'int'");
                return MsgValueError;

            }
            auto& aArg = *maybe__aArg;
            // Sentinel = 'aArg'
            if ((!(((&(reader__)))->ReadSentinel(60162428)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int'");
                return MsgValueError;
            }
            auto maybe__aInputBlockId = IPC::ReadParam<mozilla::Maybe<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;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyAPZStateChange(std::move(aGuid), std::move(aChange), std::move(aArg), std::move(aInputBlockId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyFlushComplete__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyFlushComplete", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyFlushComplete();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyAsyncScrollbarDragInitiated__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncScrollbarDragInitiated", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aDragBlockId = *maybe__aDragBlockId;
            // Sentinel = 'aDragBlockId'
            if ((!(((&(reader__)))->ReadSentinel(484246648)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            auto maybe__aScrollId = IPC::ReadParam<ViewID>((&(reader__)));
            if (!maybe__aScrollId) {
                FatalError("Error deserializing 'ViewID'");
                return MsgValueError;

            }
            auto& aScrollId = *maybe__aScrollId;
            // Sentinel = 'aScrollId'
            if ((!(((&(reader__)))->ReadSentinel(293602174)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
                return MsgValueError;
            }
            auto maybe__aDirection = IPC::ReadParam<ScrollDirection>((&(reader__)));
            if (!maybe__aDirection) {
                FatalError("Error deserializing 'ScrollDirection'");
                return MsgValueError;

            }
            auto& aDirection = *maybe__aDirection;
            // Sentinel = 'aDirection'
            if ((!(((&(reader__)))->ReadSentinel(356647939)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollDirection'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyAsyncScrollbarDragInitiated(std::move(aDragBlockId), std::move(aScrollId), std::move(aDirection));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyAsyncScrollbarDragRejected__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncScrollbarDragRejected", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aScrollId = *maybe__aScrollId;
            // Sentinel = 'aScrollId'
            if ((!(((&(reader__)))->ReadSentinel(293602174)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyAsyncScrollbarDragRejected(std::move(aScrollId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_NotifyAsyncAutoscrollRejected__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncAutoscrollRejected", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aScrollId = *maybe__aScrollId;
            // Sentinel = 'aScrollId'
            if ((!(((&(reader__)))->ReadSentinel(293602174)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvNotifyAsyncAutoscrollRejected(std::move(aScrollId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PAPZ::Msg_Destroy__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PAPZChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PAPZ::Msg_Destroy", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<APZChild*>(this))->RecvDestroy();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PAPZChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PAPZChild::Result
{
    return MsgNotKnown;
}



} // namespace layers
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::layers::PAPZChild*>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
    // Sentinel = 'PAPZ'
    (aWriter)->WriteSentinel(50397500);
}

auto ParamTraits<::mozilla::layers::PAPZChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
    if (!maybe__actor) {
        aReader->FatalError("Error deserializing managed PAPZ actor");
        return {};

    }
    auto& actor = *maybe__actor;
    // Sentinel = 'PAPZ'
    if ((!((aReader)->ReadSentinel(50397500)))) {
        mozilla::ipc::SentinelReadError("Error deserializing managed PAPZ actor");
        return {};
    }

    if (actor && actor->GetProtocolId() != PAPZMsgStart) {
        aReader->FatalError("Unexpected actor type (expected PAPZ)");

        return {};
    }
    return static_cast<::mozilla::layers::PAPZChild*>(actor);
}

} // namespace IPC
