Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/layers/PAPZInputBridgeChild.h"
#include "InputData.h"
#include "ipc/nsGUIEventIPC.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/layers/APZInputBridge.h"
#include "mozilla/layers/APZInputBridgeChild.h"
#include "mozilla/layers/ScrollableLayerGuid.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
namespace mozilla {
namespace layers {
auto PAPZInputBridgeChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PAPZInputBridgeChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PAPZInputBridgeChild::PAPZInputBridgeChild() :
mozilla::ipc::IToplevelProtocol("PAPZInputBridgeChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PAPZInputBridgeChild);
}
PAPZInputBridgeChild::~PAPZInputBridgeChild()
{
MOZ_COUNT_DTOR(PAPZInputBridgeChild);
}
auto PAPZInputBridgeChild::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PAPZInputBridgeChild'");
AddRef();
}
auto PAPZInputBridgeChild::ActorDealloc() -> void
{
Release();
}
auto PAPZInputBridgeChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PAPZInputBridgeChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PAPZInputBridgeChild::SendReceiveMultiTouchInputEvent(
const MultiTouchInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
MultiTouchInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceiveMultiTouchInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveMultiTouchInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceiveMultiTouchInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<MultiTouchInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'MultiTouchInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MultiTouchInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceiveMouseInputEvent(
const MouseInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
MouseInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceiveMouseInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveMouseInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceiveMouseInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<MouseInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'MouseInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MouseInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceivePanGestureInputEvent(
const PanGestureInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
PanGestureInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceivePanGestureInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceivePanGestureInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceivePanGestureInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<PanGestureInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'PanGestureInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'PanGestureInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceivePinchGestureInputEvent(
const PinchGestureInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
PinchGestureInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceivePinchGestureInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceivePinchGestureInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceivePinchGestureInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<PinchGestureInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'PinchGestureInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'PinchGestureInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceiveTapGestureInputEvent(
const TapGestureInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
TapGestureInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceiveTapGestureInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveTapGestureInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceiveTapGestureInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<TapGestureInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'TapGestureInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'TapGestureInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceiveScrollWheelInputEvent(
const ScrollWheelInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
ScrollWheelInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceiveScrollWheelInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveScrollWheelInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceiveScrollWheelInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<ScrollWheelInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'ScrollWheelInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ScrollWheelInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendReceiveKeyboardInputEvent(
const KeyboardInput& aEvent,
const bool& aWantsCallback,
APZEventResult* aOutResult,
KeyboardInput* aOutEvent) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ReceiveKeyboardInputEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEvent);
// Sentinel = 'aEvent'
((&(writer__)))->WriteSentinel(133956196);
IPC::WriteParam((&(writer__)), aWantsCallback);
// Sentinel = 'aWantsCallback'
((&(writer__)))->WriteSentinel(685704572);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ReceiveKeyboardInputEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ReceiveKeyboardInputEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutResult__reply = IPC::ReadParam<APZEventResult>((&(reader__)));
if (!maybe__aOutResult__reply) {
FatalError("Error deserializing 'APZEventResult'");
return false;
}
auto& aOutResult__reply = *maybe__aOutResult__reply;
// Sentinel = 'aOutResult'
if ((!(((&(reader__)))->ReadSentinel(365626393)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZEventResult'");
return false;
}
auto maybe__aOutEvent__reply = IPC::ReadParam<KeyboardInput>((&(reader__)));
if (!maybe__aOutEvent__reply) {
FatalError("Error deserializing 'KeyboardInput'");
return false;
}
auto& aOutEvent__reply = *maybe__aOutEvent__reply;
// Sentinel = 'aOutEvent'
if ((!(((&(reader__)))->ReadSentinel(293929884)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'KeyboardInput'");
return false;
}
(*(aOutResult)) = std::move(aOutResult__reply);
(*(aOutEvent)) = std::move(aOutEvent__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::SendUpdateWheelTransaction(
const LayoutDeviceIntPoint& aRefPoint,
const EventMessage& aEventMessage,
const mozilla::Maybe<ScrollableLayerGuid>& aTargetGuid) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_UpdateWheelTransaction(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aRefPoint);
// Sentinel = 'aRefPoint'
((&(writer__)))->WriteSentinel(285213577);
IPC::WriteParam((&(writer__)), aEventMessage);
// Sentinel = 'aEventMessage'
((&(writer__)))->WriteSentinel(596772137);
IPC::WriteParam((&(writer__)), aTargetGuid);
// Sentinel = 'aTargetGuid'
((&(writer__)))->WriteSentinel(429589586);
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_UpdateWheelTransaction", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PAPZInputBridgeChild::SendProcessUnhandledEvent(
const LayoutDeviceIntPoint& aRefPoint,
LayoutDeviceIntPoint* aOutRefPoint,
ScrollableLayerGuid* aOutTargetGuid,
uint64_t* aOutFocusSequenceNumber,
LayersId* aOutLayersId) -> bool
{
UniquePtr<IPC::Message> msg__ = PAPZInputBridge::Msg_ProcessUnhandledEvent(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aRefPoint);
// Sentinel = 'aRefPoint'
((&(writer__)))->WriteSentinel(285213577);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_ProcessUnhandledEvent", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PAPZInputBridge::Msg_ProcessUnhandledEvent", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__aOutRefPoint__reply = IPC::ReadParam<LayoutDeviceIntPoint>((&(reader__)));
if (!maybe__aOutRefPoint__reply) {
FatalError("Error deserializing 'LayoutDeviceIntPoint'");
return false;
}
auto& aOutRefPoint__reply = *maybe__aOutRefPoint__reply;
// Sentinel = 'aOutRefPoint'
if ((!(((&(reader__)))->ReadSentinel(506528961)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDeviceIntPoint'");
return false;
}
auto maybe__aOutTargetGuid__reply = IPC::ReadParam<ScrollableLayerGuid>((&(reader__)));
if (!maybe__aOutTargetGuid__reply) {
FatalError("Error deserializing 'ScrollableLayerGuid'");
return false;
}
auto& aOutTargetGuid__reply = *maybe__aOutTargetGuid__reply;
// Sentinel = 'aOutTargetGuid'
if ((!(((&(reader__)))->ReadSentinel(691799434)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'");
return false;
}
auto maybe__aOutFocusSequenceNumber__reply = IPC::ReadParam<uint64_t>((&(reader__)));
if (!maybe__aOutFocusSequenceNumber__reply) {
FatalError("Error deserializing 'uint64_t'");
return false;
}
auto& aOutFocusSequenceNumber__reply = *maybe__aOutFocusSequenceNumber__reply;
// Sentinel = 'aOutFocusSequenceNumber'
if ((!(((&(reader__)))->ReadSentinel(1841105212)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
return false;
}
auto maybe__aOutLayersId__reply = IPC::ReadParam<LayersId>((&(reader__)));
if (!maybe__aOutLayersId__reply) {
FatalError("Error deserializing 'LayersId'");
return false;
}
auto& aOutLayersId__reply = *maybe__aOutLayersId__reply;
// Sentinel = 'aOutLayersId'
if ((!(((&(reader__)))->ReadSentinel(512754871)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'");
return false;
}
(*(aOutRefPoint)) = std::move(aOutRefPoint__reply);
(*(aOutTargetGuid)) = std::move(aOutTargetGuid__reply);
(*(aOutFocusSequenceNumber)) = std::move(aOutFocusSequenceNumber__reply);
(*(aOutLayersId)) = std::move(aOutLayersId__reply);
reader__.EndRead();
return true;
}
auto PAPZInputBridgeChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PAPZInputBridgeChild::OnMessageReceived(const Message& msg__) -> PAPZInputBridgeChild::Result
{
switch (msg__.type()) {
case PAPZInputBridge::Msg_CallInputBlockCallback__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_CallInputBlockCallback", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aInputBlockId = IPC::ReadParam<uint64_t>((&(reader__)));
if (!maybe__aInputBlockId) {
FatalError("Error deserializing 'uint64_t'");
return MsgValueError;
}
auto& aInputBlockId = *maybe__aInputBlockId;
// Sentinel = 'aInputBlockId'
if ((!(((&(reader__)))->ReadSentinel(595657994)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
return MsgValueError;
}
auto maybe__aHandledResult = IPC::ReadParam<APZHandledResult>((&(reader__)));
if (!maybe__aHandledResult) {
FatalError("Error deserializing 'APZHandledResult'");
return MsgValueError;
}
auto& aHandledResult = *maybe__aHandledResult;
// Sentinel = 'aHandledResult'
if ((!(((&(reader__)))->ReadSentinel(675153297)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'APZHandledResult'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<APZInputBridgeChild*>(this))->RecvCallInputBlockCallback(std::move(aInputBlockId), std::move(aHandledResult));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PAPZInputBridge::Msg_HandleTap__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PAPZInputBridge", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PAPZInputBridgeChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PAPZInputBridge::Msg_HandleTap", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aType = IPC::ReadParam<GeckoContentController_TapType>((&(reader__)));
if (!maybe__aType) {
FatalError("Error deserializing 'GeckoContentController_TapType'");
return MsgValueError;
}
auto& aType = *maybe__aType;
// Sentinel = 'aType'
if ((!(((&(reader__)))->ReadSentinel(99222020)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GeckoContentController_TapType'");
return MsgValueError;
}
auto maybe__point = IPC::ReadParam<LayoutDevicePoint>((&(reader__)));
if (!maybe__point) {
FatalError("Error deserializing 'LayoutDevicePoint'");
return MsgValueError;
}
auto& point = *maybe__point;
// Sentinel = 'point'
if ((!(((&(reader__)))->ReadSentinel(108790315)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDevicePoint'");
return MsgValueError;
}
auto maybe__aModifiers = IPC::ReadParam<Modifiers>((&(reader__)));
if (!maybe__aModifiers) {
FatalError("Error deserializing 'Modifiers'");
return MsgValueError;
}
auto& aModifiers = *maybe__aModifiers;
// Sentinel = 'aModifiers'
if ((!(((&(reader__)))->ReadSentinel(358286340)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Modifiers'");
return MsgValueError;
}
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__aInputBlockId = IPC::ReadParam<uint64_t>((&(reader__)));
if (!maybe__aInputBlockId) {
FatalError("Error deserializing 'uint64_t'");
return MsgValueError;
}
auto& aInputBlockId = *maybe__aInputBlockId;
// Sentinel = 'aInputBlockId'
if ((!(((&(reader__)))->ReadSentinel(595657994)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
return MsgValueError;
}
auto maybe__aDoubleTapToZoomMetrics = IPC::ReadParam<mozilla::Maybe<DoubleTapToZoomMetrics>>((&(reader__)));
if (!maybe__aDoubleTapToZoomMetrics) {
FatalError("Error deserializing 'DoubleTapToZoomMetrics?'");
return MsgValueError;
}
auto& aDoubleTapToZoomMetrics = *maybe__aDoubleTapToZoomMetrics;
// Sentinel = 'aDoubleTapToZoomMetrics'
if ((!(((&(reader__)))->ReadSentinel(1803225377)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'DoubleTapToZoomMetrics?'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<APZInputBridgeChild*>(this))->RecvHandleTap(std::move(aType), std::move(point), std::move(aModifiers), std::move(aGuid), std::move(aInputBlockId), std::move(aDoubleTapToZoomMetrics));
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 PAPZInputBridgeChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PAPZInputBridgeChild::Result
{
return MsgNotKnown;
}
} // namespace layers
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::layers::PAPZInputBridgeChild*>::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::PAPZInputBridgeChild*>::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, "PAPZInputBridge", PAPZInputBridgeMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::layers::PAPZInputBridgeChild*>(actor.ref());
}
return {};
}
} // namespace IPC