Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/layers/PAPZParent.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.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/PCompositorBridgeParent.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 PAPZParent::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
MOZ_IMPLICIT PAPZParent::PAPZParent() :
mozilla::ipc::IProtocol(PAPZMsgStart, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PAPZParent);
}
PAPZParent::~PAPZParent()
{
MOZ_COUNT_DTOR(PAPZParent);
}
auto PAPZParent::ActorAlloc() -> void
{
}
auto PAPZParent::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(PAPZMsgStart, this);
}
}
auto PAPZParent::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PAPZParent::Manager() const -> PCompositorBridgeParent*
{
return static_cast<PCompositorBridgeParent*>(IProtocol::Manager());
}
auto PAPZParent::AllManagedActors(nsTArray<RefPtr<mozilla::ipc::ActorLifecycleProxy>>& arr__) const -> void
{
uint32_t total = 0;
arr__.SetCapacity(total);
}
auto PAPZParent::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PAPZParent::SendLayerTransforms(mozilla::Span<MatrixMessage const> aTransforms) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_LayerTransforms(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aTransforms);
// Sentinel = 'aTransforms'
((&(writer__)))->WriteSentinel(446235793);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_LayerTransforms", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendRequestContentRepaint(const RepaintRequest& request) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_RequestContentRepaint(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), request);
// Sentinel = 'request'
((&(writer__)))->WriteSentinel(202703626);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_RequestContentRepaint", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendUpdateOverscrollVelocity(
const ScrollableLayerGuid& aGuid,
const float& aX,
const float& aY,
const bool& aIsRootContent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_UpdateOverscrollVelocity(Id());
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("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollVelocity", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendUpdateOverscrollOffset(
const ScrollableLayerGuid& aGuid,
const float& aX,
const float& aY,
const bool& aIsRootContent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_UpdateOverscrollOffset(Id());
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("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollOffset", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyMozMouseScrollEvent(
const ViewID& aScrollId,
const nsAString& aEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyMozMouseScrollEvent(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aScrollId);
// Sentinel = 'aScrollId'
((&(writer__)))->WriteSentinel(293602174);
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyMozMouseScrollEvent", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyAPZStateChange(
const ScrollableLayerGuid& aGuid,
const GeckoContentController_APZStateChange& aChange,
const int& aArg,
const mozilla::Maybe<uint64_t>& aInputBlockId) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyAPZStateChange(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aGuid);
// Sentinel = 'aGuid'
((&(writer__)))->WriteSentinel(94044651);
IPC::WriteParam((&(writer__)), aChange);
// Sentinel = 'aChange'
((&(writer__)))->WriteSentinel(172556968);
IPC::WriteParam((&(writer__)), aArg);
// Sentinel = 'aArg'
((&(writer__)))->WriteSentinel(60162428);
IPC::WriteParam((&(writer__)), aInputBlockId);
// Sentinel = 'aInputBlockId'
((&(writer__)))->WriteSentinel(595657994);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAPZStateChange", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyFlushComplete() -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyFlushComplete(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyFlushComplete", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyAsyncScrollbarDragInitiated(
const uint64_t& aDragBlockId,
const ViewID& aScrollId,
const ScrollDirection& aDirection) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyAsyncScrollbarDragInitiated(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aDragBlockId);
// Sentinel = 'aDragBlockId'
((&(writer__)))->WriteSentinel(484246648);
IPC::WriteParam((&(writer__)), aScrollId);
// Sentinel = 'aScrollId'
((&(writer__)))->WriteSentinel(293602174);
IPC::WriteParam((&(writer__)), aDirection);
// Sentinel = 'aDirection'
((&(writer__)))->WriteSentinel(356647939);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncScrollbarDragInitiated", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyAsyncScrollbarDragRejected(const ViewID& aScrollId) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyAsyncScrollbarDragRejected(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aScrollId);
// Sentinel = 'aScrollId'
((&(writer__)))->WriteSentinel(293602174);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncScrollbarDragRejected", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendNotifyAsyncAutoscrollRejected(const ViewID& aScrollId) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_NotifyAsyncAutoscrollRejected(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aScrollId);
// Sentinel = 'aScrollId'
((&(writer__)))->WriteSentinel(293602174);
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncAutoscrollRejected", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZParent::SendDestroy() -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZ::Msg_Destroy(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
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 PAPZParent::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PAPZParent::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PAPZParent::OnMessageReceived(const Message& msg__) -> PAPZParent::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;
IProtocol* mgr = this->Manager();
this->DestroySubtree(ManagedEndpointDropped);
this->ClearSubtree();
mgr->RemoveManagee(PAPZMsgStart, this);
return MsgProcessed;
}
case PAPZ::Msg___delete____ID:
{
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PAPZ::Msg___delete__", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<RemoteContentController*>(this))->Recv__delete__();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
IProtocol* mgr = this->Manager();
this->DestroySubtree(Deletion);
this->ClearSubtree();
mgr->RemoveManagee(PAPZMsgStart, this);
return MsgProcessed;
}
case PAPZ::Msg_Destroy__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PAPZ", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PAPZ::Msg_Destroy", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<RemoteContentController*>(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 PAPZParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PAPZParent::Result
{
return MsgNotKnown;
}
auto PAPZParent::ClearSubtree() -> void
{
}
} // namespace layers
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::layers::PAPZParent*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::layers::PAPZParent*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PAPZ", PAPZMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::layers::PAPZParent*>(actor.ref());
}
return {};
}
} // namespace IPC