// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/layers/PUiCompositorControllerChild.h" #include "mozilla/GfxMessageUtils.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/ProfilerMarkers.h" #include "mozilla/layers/LayersMessageUtils.h" #include "mozilla/layers/UiCompositorControllerChild.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 PUiCompositorControllerChild::ProcessingError( Result aCode, const char* aReason) -> void { } auto PUiCompositorControllerChild::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PUiCompositorControllerChild::PUiCompositorControllerChild() : mozilla::ipc::IToplevelProtocol("PUiCompositorControllerChild", kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PUiCompositorControllerChild); } PUiCompositorControllerChild::~PUiCompositorControllerChild() { MOZ_COUNT_DTOR(PUiCompositorControllerChild); } auto PUiCompositorControllerChild::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PUiCompositorControllerChild'"); AddRef(); } auto PUiCompositorControllerChild::ActorDealloc() -> void { Release(); } auto PUiCompositorControllerChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PUiCompositorControllerChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PUiCompositorControllerChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PUiCompositorControllerChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PUiCompositorControllerChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PUiCompositorControllerChild::SendPause() -> bool { UniquePtr msg__ = PUiCompositorController::Msg_Pause(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; UniquePtr reply__; if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pause", OTHER); bool sendok__ = false; { AUTO_PROFILER_MARKER("PUiCompositorController::Msg_Pause", IPC); sendok__ = ChannelSend(std::move(msg__), (&(reply__))); } if ((!(sendok__))) { return false; } if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received reply ", reply__->type(), mozilla::ipc::MessageDirection::eReceiving); } return true; } auto PUiCompositorControllerChild::SendResume(bool* aOutResumed) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_Resume(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; UniquePtr reply__; if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Resume", OTHER); bool sendok__ = false; { AUTO_PROFILER_MARKER("PUiCompositorController::Msg_Resume", IPC); sendok__ = ChannelSend(std::move(msg__), (&(reply__))); } if ((!(sendok__))) { return false; } if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received reply ", reply__->type(), mozilla::ipc::MessageDirection::eReceiving); } IPC::MessageReader reader__{ (*(reply__)), this}; auto maybe__aOutResumed__reply = IPC::ReadParam((&(reader__))); if (!maybe__aOutResumed__reply) { FatalError("Error deserializing 'bool'"); return false; } auto& aOutResumed__reply = *maybe__aOutResumed__reply; // Sentinel = 'aOutResumed' if ((!(((&(reader__)))->ReadSentinel(439157871)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return false; } (*(aOutResumed)) = std::move(aOutResumed__reply); reader__.EndRead(); return true; } auto PUiCompositorControllerChild::SendResumeAndResize( const int32_t& aX, const int32_t& aY, const int32_t& aWidth, const int32_t& aHeight, bool* aOutResumed) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_ResumeAndResize(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aX); // Sentinel = 'aX' ((&(writer__)))->WriteSentinel(18612410); IPC::WriteParam((&(writer__)), aY); // Sentinel = 'aY' ((&(writer__)))->WriteSentinel(18677947); IPC::WriteParam((&(writer__)), aWidth); // Sentinel = 'aWidth' ((&(writer__)))->WriteSentinel(136249954); IPC::WriteParam((&(writer__)), aHeight); // Sentinel = 'aHeight' ((&(writer__)))->WriteSentinel(175375035); UniquePtr reply__; if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ResumeAndResize", OTHER); bool sendok__ = false; { AUTO_PROFILER_MARKER("PUiCompositorController::Msg_ResumeAndResize", IPC); sendok__ = ChannelSend(std::move(msg__), (&(reply__))); } if ((!(sendok__))) { return false; } if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received reply ", reply__->type(), mozilla::ipc::MessageDirection::eReceiving); } IPC::MessageReader reader__{ (*(reply__)), this}; auto maybe__aOutResumed__reply = IPC::ReadParam((&(reader__))); if (!maybe__aOutResumed__reply) { FatalError("Error deserializing 'bool'"); return false; } auto& aOutResumed__reply = *maybe__aOutResumed__reply; // Sentinel = 'aOutResumed' if ((!(((&(reader__)))->ReadSentinel(439157871)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return false; } (*(aOutResumed)) = std::move(aOutResumed__reply); reader__.EndRead(); return true; } auto PUiCompositorControllerChild::SendInvalidateAndRender() -> bool { UniquePtr msg__ = PUiCompositorController::Msg_InvalidateAndRender(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_InvalidateAndRender", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerChild::SendFixedBottomOffset(const int32_t& aOffset) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_FixedBottomOffset(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aOffset); // Sentinel = 'aOffset' ((&(writer__)))->WriteSentinel(179634889); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_FixedBottomOffset", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerChild::SendDefaultClearColor(const uint32_t& aColor) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_DefaultClearColor(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aColor); // Sentinel = 'aColor' ((&(writer__)))->WriteSentinel(132842081); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_DefaultClearColor", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerChild::SendRequestScreenPixels( const uint64_t& aRequestId, const IntRect& aSourceRect, const FileDescriptor& aHardwareBuffer) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_RequestScreenPixels(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aRequestId); // Sentinel = 'aRequestId' ((&(writer__)))->WriteSentinel(365560824); IPC::WriteParam((&(writer__)), aSourceRect); // Sentinel = 'aSourceRect' ((&(writer__)))->WriteSentinel(438109281); IPC::WriteParam((&(writer__)), aHardwareBuffer); // Sentinel = 'aHardwareBuffer' ((&(writer__)))->WriteSentinel(779879914); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RequestScreenPixels", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerChild::SendEnableLayerUpdateNotifications(const bool& aEnable) -> bool { UniquePtr msg__ = PUiCompositorController::Msg_EnableLayerUpdateNotifications(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aEnable); // Sentinel = 'aEnable' ((&(writer__)))->WriteSentinel(173605545); if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_EnableLayerUpdateNotifications", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PUiCompositorControllerChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PUiCompositorControllerChild::OnMessageReceived(const Message& msg__) -> PUiCompositorControllerChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aMessage = IPC::ReadParam((&(reader__))); if (!maybe__aMessage) { FatalError("Error deserializing 'int32_t'"); return MsgValueError; } auto& aMessage = *maybe__aMessage; // Sentinel = 'aMessage' if ((!(((&(reader__)))->ReadSentinel(233440039)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerChild*>(this))->RecvToolbarAnimatorMessageFromCompositor(std::move(aMessage)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_NotifyCompositorScrollUpdates__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_NotifyCompositorScrollUpdates", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aUpdates = IPC::ReadParam>((&(reader__))); if (!maybe__aUpdates) { FatalError("Error deserializing 'CompositorScrollUpdate[]'"); return MsgValueError; } auto& aUpdates = *maybe__aUpdates; // Sentinel = 'aUpdates' if ((!(((&(reader__)))->ReadSentinel(236192568)))) { mozilla::ipc::SentinelReadError("Error deserializing 'CompositorScrollUpdate[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerChild*>(this))->RecvNotifyCompositorScrollUpdates(std::move(aUpdates)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PUiCompositorController::Msg_ScreenPixels__ID: { if (mozilla::ipc::LoggingEnabledFor("PUiCompositorController", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PUiCompositorControllerChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ScreenPixels", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aRequestId = IPC::ReadParam((&(reader__))); if (!maybe__aRequestId) { FatalError("Error deserializing 'uint64_t'"); return MsgValueError; } auto& aRequestId = *maybe__aRequestId; // Sentinel = 'aRequestId' if ((!(((&(reader__)))->ReadSentinel(365560824)))) { mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); return MsgValueError; } auto maybe__aSuccess = IPC::ReadParam((&(reader__))); if (!maybe__aSuccess) { FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& aSuccess = *maybe__aSuccess; // Sentinel = 'aSuccess' if ((!(((&(reader__)))->ReadSentinel(236323643)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } auto maybe__aAcquireFence = IPC::ReadParam>((&(reader__))); if (!maybe__aAcquireFence) { FatalError("Error deserializing 'FileDescriptor?'"); return MsgValueError; } auto& aAcquireFence = *maybe__aAcquireFence; // Sentinel = 'aAcquireFence' if ((!(((&(reader__)))->ReadSentinel(586745101)))) { mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor?'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::layers::UiCompositorControllerChild*>(this))->RecvScreenPixels(std::move(aRequestId), std::move(aSuccess), std::move(aAcquireFence)); 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 PUiCompositorControllerChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PUiCompositorControllerChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace layers } // namespace mozilla