Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PWebIdentityParent.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/IdentityCredentialSerializationHelpers.h"
#include "mozilla/dom/WebIdentityParent.h"
#include "mozilla/dom/PWindowGlobalParent.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 {
MOZ_IMPLICIT PWebIdentityParent::PWebIdentityParent() :
mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PWebIdentityParent);
}
PWebIdentityParent::~PWebIdentityParent()
{
MOZ_COUNT_DTOR(PWebIdentityParent);
}
auto PWebIdentityParent::ActorAlloc() -> void
{
AddRef();
}
auto PWebIdentityParent::ActorDealloc() -> void
{
Release();
}
auto PWebIdentityParent::Manager() const -> PWindowGlobalParent*
{
return static_cast<PWindowGlobalParent*>(IProtocol::Manager());
}
auto PWebIdentityParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PWebIdentityParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PWebIdentityParent::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PWebIdentityParent::Send__delete__(PWebIdentityParent* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PWebIdentity::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PWebIdentityParent::DeallocManagee(
mozilla::ipc::ProtocolId aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PWebIdentityParent::OnMessageReceived(const Message& msg__) -> PWebIdentityParent::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 PWebIdentity::Msg_RequestCancel__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg_RequestCancel", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<WebIdentityParent*>(this))->RecvRequestCancel();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PWebIdentity::Msg_GetIdentityCredential__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg_GetIdentityCredential", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aOptions = IPC::ReadParam<IdentityCredentialRequestOptions>((&(reader__)));
if (!maybe__aOptions) {
FatalError("Error deserializing 'IdentityCredentialRequestOptions'");
return MsgValueError;
}
auto& aOptions = *maybe__aOptions;
// Sentinel = 'aOptions'
if ((!(((&(reader__)))->ReadSentinel(240976718)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IdentityCredentialRequestOptions'");
return MsgValueError;
}
auto maybe__aMediationRequirement = IPC::ReadParam<CredentialMediationRequirement>((&(reader__)));
if (!maybe__aMediationRequirement) {
FatalError("Error deserializing 'CredentialMediationRequirement'");
return MsgValueError;
}
auto& aMediationRequirement = *maybe__aMediationRequirement;
// Sentinel = 'aMediationRequirement'
if ((!(((&(reader__)))->ReadSentinel(1539508365)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'CredentialMediationRequirement'");
return MsgValueError;
}
auto maybe__aHasUserActivation = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aHasUserActivation) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aHasUserActivation = *maybe__aHasUserActivation;
// Sentinel = 'aHasUserActivation'
if ((!(((&(reader__)))->ReadSentinel(1109133103)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = Id();
UniquePtr<IPC::Message> reply__(PWebIdentity::Reply_GetIdentityCredential(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
GetIdentityCredentialResolver resolver = [resolver__ = std::move(resolver__)](const WebIdentityGetCredentialResponse& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'response'
((&(writer__)))->WriteSentinel(260965232);
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<WebIdentityParent*>(this))->RecvGetIdentityCredential(std::move(aOptions), std::move(aMediationRequirement), std::move(aHasUserActivation), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PWebIdentity::Msg_DisconnectIdentityCredential__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg_DisconnectIdentityCredential", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aOptions = IPC::ReadParam<IdentityCredentialDisconnectOptions>((&(reader__)));
if (!maybe__aOptions) {
FatalError("Error deserializing 'IdentityCredentialDisconnectOptions'");
return MsgValueError;
}
auto& aOptions = *maybe__aOptions;
// Sentinel = 'aOptions'
if ((!(((&(reader__)))->ReadSentinel(240976718)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IdentityCredentialDisconnectOptions'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = Id();
UniquePtr<IPC::Message> reply__(PWebIdentity::Reply_DisconnectIdentityCredential(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
DisconnectIdentityCredentialResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'rv'
((&(writer__)))->WriteSentinel(22806761);
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<WebIdentityParent*>(this))->RecvDisconnectIdentityCredential(std::move(aOptions), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PWebIdentity::Msg_PreventSilentAccess__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg_PreventSilentAccess", OTHER);
mozilla::ipc::ActorId id__ = Id();
UniquePtr<IPC::Message> reply__(PWebIdentity::Reply_PreventSilentAccess(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
PreventSilentAccessResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'rv'
((&(writer__)))->WriteSentinel(22806761);
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<WebIdentityParent*>(this))->RecvPreventSilentAccess(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PWebIdentity::Msg_SetLoginStatus__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PWebIdentity::Msg_SetLoginStatus", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__foo = IPC::ReadParam<LoginStatus>((&(reader__)));
if (!maybe__foo) {
FatalError("Error deserializing 'LoginStatus'");
return MsgValueError;
}
auto& foo = *maybe__foo;
// Sentinel = 'foo'
if ((!(((&(reader__)))->ReadSentinel(42074437)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'LoginStatus'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = Id();
UniquePtr<IPC::Message> reply__(PWebIdentity::Reply_SetLoginStatus(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
SetLoginStatusResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'rv'
((&(writer__)))->WriteSentinel(22806761);
if (mozilla::ipc::LoggingEnabledFor("PWebIdentity", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PWebIdentityParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<WebIdentityParent*>(this))->RecvSetLoginStatus(std::move(foo), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PWebIdentity::Reply___delete____ID:
{
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PWebIdentityParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PWebIdentityParent::Result
{
return MsgNotKnown;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PWebIdentityParent*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
// Sentinel = 'PWebIdentity'
(aWriter)->WriteSentinel(484508857);
}
auto ParamTraits<::mozilla::dom::PWebIdentityParent*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
if (!maybe__actor) {
aReader->FatalError("Error deserializing managed PWebIdentity actor");
return {};
}
auto& actor = *maybe__actor;
// Sentinel = 'PWebIdentity'
if ((!((aReader)->ReadSentinel(484508857)))) {
mozilla::ipc::SentinelReadError("Error deserializing managed PWebIdentity actor");
return {};
}
if (actor && actor->GetProtocolId() != PWebIdentityMsgStart) {
aReader->FatalError("Unexpected actor type (expected PWebIdentity)");
return {};
}
return static_cast<::mozilla::dom::PWebIdentityParent*>(actor);
}
} // namespace IPC