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


#include "mozilla/dom/PBrowserBridgeChild.h"
#include "ipc/nsGUIEventIPC.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/LayoutMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RemoteLazyInputStream.h"
#include "mozilla/URLClassifierIPCUtils.h"
#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/BrowserBridgeChild.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PolicyContainerMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/dom/TabMessageUtils.h"
#include "mozilla/dom/notification/IPCUtils.h"
#include "mozilla/ipc/BigBuffer.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/SerializedStructuredCloneBuffer.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "nsDocShellLoadState.h"
#include "nsIPolicyContainer.h"
#include "nsIPrincipal.h"
#include "nsIReferrerInfo.h"
#include "nsIURI.h"
#include "nsIVariant.h"
#include "nsRect.h"

#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/a11y/PDocAccessibleChild.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 dom {


auto PBrowserBridgeChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

MOZ_IMPLICIT PBrowserBridgeChild::PBrowserBridgeChild() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PBrowserBridgeChild);
}

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

auto PBrowserBridgeChild::ActorAlloc() -> void
{
    AddRef();
}

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

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

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

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

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

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

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

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


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

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

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

auto PBrowserBridgeChild::SendBeginDestroy() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_BeginDestroy(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBrowserBridgeChild::SendLoadURL(mozilla::NotNull<nsDocShellLoadState*> aLoadState) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_LoadURL(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendResumeLoad(const uint64_t& aPendingSwitchID) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_ResumeLoad(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendShow(const OwnerShowInfo& info) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_Show(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendScrollbarPreferenceChanged(const ScrollbarPreference& pref) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_ScrollbarPreferenceChanged(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendUpdateDimensions(
        const LayoutDeviceIntRect& rect,
        const LayoutDeviceIntSize& size) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_UpdateDimensions(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), rect);
    // Sentinel = 'rect'
    ((&(writer__)))->WriteSentinel(70582703);
    IPC::WriteParam((&(writer__)), size);
    // Sentinel = 'size'
    ((&(writer__)))->WriteSentinel(73662908);


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

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

auto PBrowserBridgeChild::SendRenderLayers(const bool& aEnabled) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_RenderLayers(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendUpdateEffects(const EffectsInfo& aEffects) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_UpdateEffects(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendUpdateRemotePrintSettings(const PrintData& aPrintData) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_UpdateRemotePrintSettings(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendNavigateByKey(
        const bool& aForward,
        const bool& aForDocumentNavigation) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_NavigateByKey(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aForward);
    // Sentinel = 'aForward'
    ((&(writer__)))->WriteSentinel(236258103);
    IPC::WriteParam((&(writer__)), aForDocumentNavigation);
    // Sentinel = 'aForDocumentNavigation'
    ((&(writer__)))->WriteSentinel(1667434712);


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

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

auto PBrowserBridgeChild::SendDispatchSynthesizedMouseEvent(const WidgetMouseEvent& event) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_DispatchSynthesizedMouseEvent(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendActivate(const uint64_t& aActionId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_Activate(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendDeactivate(
        const bool& aWindowLowering,
        const uint64_t& aActionId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_Deactivate(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aWindowLowering);
    // Sentinel = 'aWindowLowering'
    ((&(writer__)))->WriteSentinel(809502241);
    IPC::WriteParam((&(writer__)), aActionId);
    // Sentinel = 'aActionId'
    ((&(writer__)))->WriteSentinel(284164973);


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

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

auto PBrowserBridgeChild::SendUpdateRemoteStyle(const StyleImageRendering& aImageRendering) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_UpdateRemoteStyle(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBrowserBridgeChild::SendWillChangeProcess() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_WillChangeProcess(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBrowserBridgeChild::SendSetEmbedderAccessible(
        PDocAccessibleChild* aDoc,
        const uint64_t& aID) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBrowserBridge::Msg_SetEmbedderAccessible(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDoc);
    // Sentinel = 'aDoc'
    ((&(writer__)))->WriteSentinel(60096888);
    IPC::WriteParam((&(writer__)), aID);
    // Sentinel = 'aID'
    ((&(writer__)))->WriteSentinel(33292527);


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

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

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

auto PBrowserBridgeChild::OnMessageReceived(const Message& msg__) -> PBrowserBridgeChild::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 PBrowserBridge::Msg_RequestFocus__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_RequestFocus", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& canRaise = *maybe__canRaise;
            // Sentinel = 'canRaise'
            if ((!(((&(reader__)))->ReadSentinel(234816295)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__aCallerType = IPC::ReadParam<CallerType>((&(reader__)));
            if (!maybe__aCallerType) {
                FatalError("Error deserializing 'CallerType'");
                return MsgValueError;

            }
            auto& aCallerType = *maybe__aCallerType;
            // Sentinel = 'aCallerType'
            if ((!(((&(reader__)))->ReadSentinel(422118487)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'CallerType'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvRequestFocus(std::move(canRaise), std::move(aCallerType));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_MoveFocus__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_MoveFocus", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& forward = *maybe__forward;
            // Sentinel = 'forward'
            if ((!(((&(reader__)))->ReadSentinel(200016630)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__forDocumentNavigation = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__forDocumentNavigation) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& forDocumentNavigation = *maybe__forDocumentNavigation;
            // Sentinel = 'forDocumentNavigation'
            if ((!(((&(reader__)))->ReadSentinel(1571555479)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvMoveFocus(std::move(forward), std::move(forDocumentNavigation));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_MaybeFireEmbedderLoadEvents__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_MaybeFireEmbedderLoadEvents", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aFireEventAtEmbeddingElement = *maybe__aFireEventAtEmbeddingElement;
            // Sentinel = 'aFireEventAtEmbeddingElement'
            if ((!(((&(reader__)))->ReadSentinel(2607483624)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'EmbedderElementEventType'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvMaybeFireEmbedderLoadEvents(std::move(aFireEventAtEmbeddingElement));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_ScrollRectIntoView__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_ScrollRectIntoView", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aRect = *maybe__aRect;
            // Sentinel = 'aRect'
            if ((!(((&(reader__)))->ReadSentinel(94044656)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsRect'");
                return MsgValueError;
            }
            auto maybe__aVertical = IPC::ReadParam<ScrollAxis>((&(reader__)));
            if (!maybe__aVertical) {
                FatalError("Error deserializing 'ScrollAxis'");
                return MsgValueError;

            }
            auto& aVertical = *maybe__aVertical;
            // Sentinel = 'aVertical'
            if ((!(((&(reader__)))->ReadSentinel(298845084)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollAxis'");
                return MsgValueError;
            }
            auto maybe__aHorizontal = IPC::ReadParam<ScrollAxis>((&(reader__)));
            if (!maybe__aHorizontal) {
                FatalError("Error deserializing 'ScrollAxis'");
                return MsgValueError;

            }
            auto& aHorizontal = *maybe__aHorizontal;
            // Sentinel = 'aHorizontal'
            if ((!(((&(reader__)))->ReadSentinel(447022220)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollAxis'");
                return MsgValueError;
            }
            auto maybe__aScrollFlags = IPC::ReadParam<ScrollFlags>((&(reader__)));
            if (!maybe__aScrollFlags) {
                FatalError("Error deserializing 'ScrollFlags'");
                return MsgValueError;

            }
            auto& aScrollFlags = *maybe__aScrollFlags;
            // Sentinel = 'aScrollFlags'
            if ((!(((&(reader__)))->ReadSentinel(510592190)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ScrollFlags'");
                return MsgValueError;
            }
            auto maybe__aAppUnitsPerDevPixel = IPC::ReadParam<int32_t>((&(reader__)));
            if (!maybe__aAppUnitsPerDevPixel) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;

            }
            auto& aAppUnitsPerDevPixel = *maybe__aAppUnitsPerDevPixel;
            // Sentinel = 'aAppUnitsPerDevPixel'
            if ((!(((&(reader__)))->ReadSentinel(1366296542)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvScrollRectIntoView(std::move(aRect), std::move(aVertical), std::move(aHorizontal), std::move(aScrollFlags), std::move(aAppUnitsPerDevPixel));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_SubFrameCrashed__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_SubFrameCrashed", OTHER);

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

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_IntrinsicSizeOrRatioChanged__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_IntrinsicSizeOrRatioChanged", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aIntrinsicSize = IPC::ReadParam<mozilla::Maybe<IntrinsicSize>>((&(reader__)));
            if (!maybe__aIntrinsicSize) {
                FatalError("Error deserializing 'IntrinsicSize?'");
                return MsgValueError;

            }
            auto& aIntrinsicSize = *maybe__aIntrinsicSize;
            // Sentinel = 'aIntrinsicSize'
            if ((!(((&(reader__)))->ReadSentinel(708052400)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'IntrinsicSize?'");
                return MsgValueError;
            }
            auto maybe__aIntrinsicRatio = IPC::ReadParam<mozilla::Maybe<AspectRatio>>((&(reader__)));
            if (!maybe__aIntrinsicRatio) {
                FatalError("Error deserializing 'AspectRatio?'");
                return MsgValueError;

            }
            auto& aIntrinsicRatio = *maybe__aIntrinsicRatio;
            // Sentinel = 'aIntrinsicRatio'
            if ((!(((&(reader__)))->ReadSentinel(807667220)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'AspectRatio?'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvIntrinsicSizeOrRatioChanged(std::move(aIntrinsicSize), std::move(aIntrinsicRatio));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Msg_ImageLoadComplete__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg_ImageLoadComplete", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& aResult = *maybe__aResult;
            // Sentinel = 'aResult'
            if ((!(((&(reader__)))->ReadSentinel(185205473)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<BrowserBridgeChild*>(this))->RecvImageLoadComplete(std::move(aResult));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBrowserBridge::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    case PBrowserBridge::Msg___delete____ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBrowserBridge", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBrowserBridgeChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBrowserBridge::Msg___delete__", OTHER);

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


            this->ActorDisconnected(Deletion);

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

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



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

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

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

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

        return {};
    }
    return static_cast<::mozilla::dom::PBrowserBridgeChild*>(actor);
}

} // namespace IPC
