LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PContentPermissionRequestChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 173 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 23 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/dom/PContentPermissionRequestChild.h"
       8             : 
       9             : #include "mozilla/dom/PContentChild.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : 
      18           0 : auto PContentPermissionRequestChild::Recv__delete__() -> mozilla::ipc::IPCResult
      19             : {
      20           0 :     return IPC_OK();
      21             : }
      22             : 
      23           0 : auto PContentPermissionRequestChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      24             : {
      25           0 : }
      26             : 
      27           0 : MOZ_IMPLICIT PContentPermissionRequestChild::PContentPermissionRequestChild() :
      28             :     mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
      29           0 :     mState(PContentPermissionRequest::__Dead)
      30             : {
      31           0 :     MOZ_COUNT_CTOR(PContentPermissionRequestChild);
      32           0 : }
      33             : 
      34           0 : PContentPermissionRequestChild::~PContentPermissionRequestChild()
      35             : {
      36           0 :     MOZ_COUNT_DTOR(PContentPermissionRequestChild);
      37           0 : }
      38             : 
      39           0 : auto PContentPermissionRequestChild::Manager() const -> PContentChild*
      40             : {
      41           0 :     return static_cast<PContentChild*>(IProtocol::Manager());
      42             : }
      43             : 
      44           0 : auto PContentPermissionRequestChild::Sendprompt() -> bool
      45             : {
      46           0 :     IPC::Message* msg__ = PContentPermissionRequest::Msg_prompt(Id());
      47             : 
      48             : 
      49             : 
      50             : 
      51             : 
      52           0 :     if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
      53           0 :         mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      54             :     }
      55           0 :     AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg_prompt", OTHER);
      56           0 :     PContentPermissionRequest::Transition(PContentPermissionRequest::Msg_prompt__ID, (&(mState)));
      57             : 
      58           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      59           0 :     return sendok__;
      60             : }
      61             : 
      62           0 : auto PContentPermissionRequestChild::SendNotifyVisibility(const bool& visibility) -> bool
      63             : {
      64           0 :     IPC::Message* msg__ = PContentPermissionRequest::Msg_NotifyVisibility(Id());
      65             : 
      66           0 :     Write(visibility, msg__);
      67             :     // Sentinel = 'visibility'
      68           0 :     (msg__)->WriteSentinel(1487550798);
      69             : 
      70             : 
      71             : 
      72             : 
      73           0 :     if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
      74           0 :         mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      75             :     }
      76           0 :     AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg_NotifyVisibility", OTHER);
      77           0 :     PContentPermissionRequest::Transition(PContentPermissionRequest::Msg_NotifyVisibility__ID, (&(mState)));
      78             : 
      79           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      80           0 :     return sendok__;
      81             : }
      82             : 
      83           0 : auto PContentPermissionRequestChild::SendDestroy() -> bool
      84             : {
      85           0 :     IPC::Message* msg__ = PContentPermissionRequest::Msg_Destroy(Id());
      86             : 
      87             : 
      88             : 
      89             : 
      90             : 
      91           0 :     if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
      92           0 :         mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      93             :     }
      94           0 :     AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg_Destroy", OTHER);
      95           0 :     PContentPermissionRequest::Transition(PContentPermissionRequest::Msg_Destroy__ID, (&(mState)));
      96             : 
      97           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      98           0 :     return sendok__;
      99             : }
     100             : 
     101           0 : auto PContentPermissionRequestChild::RemoveManagee(
     102             :         int32_t aProtocolId,
     103             :         ProtocolBase* aListener) -> void
     104             : {
     105           0 :     FatalError("unreached");
     106           0 :     return;
     107             : }
     108             : 
     109           0 : auto PContentPermissionRequestChild::OnMessageReceived(const Message& msg__) -> PContentPermissionRequestChild::Result
     110             : {
     111           0 :     switch ((msg__).type()) {
     112             :     case PContentPermissionRequest::Msg_GetVisibility__ID:
     113             :         {
     114           0 :             if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
     115           0 :                 mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     116             :             }
     117           0 :             AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg_GetVisibility", OTHER);
     118             : 
     119           0 :             PContentPermissionRequest::Transition(PContentPermissionRequest::Msg_GetVisibility__ID, (&(mState)));
     120           0 :             if ((!(RecvGetVisibility()))) {
     121           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     122             :                 // Error handled in mozilla::ipc::IPCResult
     123           0 :                 return MsgProcessingError;
     124             :             }
     125             : 
     126           0 :             return MsgProcessed;
     127             :         }
     128             :     case PContentPermissionRequest::Msg_NotifyResult__ID:
     129             :         {
     130           0 :             if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
     131           0 :                 mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     132             :             }
     133           0 :             AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg_NotifyResult", OTHER);
     134             : 
     135           0 :             PickleIterator iter__(msg__);
     136             :             bool allow;
     137           0 :             nsTArray<PermissionChoice> choices;
     138             : 
     139           0 :             if ((!(Read((&(allow)), (&(msg__)), (&(iter__)))))) {
     140           0 :                 FatalError("Error deserializing 'bool'");
     141           0 :                 return MsgValueError;
     142             :             }
     143             :             // Sentinel = 'allow'
     144           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3737033206)))) {
     145           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     146           0 :                 return MsgValueError;
     147             :             }
     148           0 :             if ((!(Read((&(choices)), (&(msg__)), (&(iter__)))))) {
     149           0 :                 FatalError("Error deserializing 'nsTArray'");
     150           0 :                 return MsgValueError;
     151             :             }
     152             :             // Sentinel = 'choices'
     153           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3898211695)))) {
     154           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
     155           0 :                 return MsgValueError;
     156             :             }
     157           0 :             (msg__).EndRead(iter__, (msg__).type());
     158           0 :             PContentPermissionRequest::Transition(PContentPermissionRequest::Msg_NotifyResult__ID, (&(mState)));
     159           0 :             if ((!(RecvNotifyResult(mozilla::Move(allow), mozilla::Move(choices))))) {
     160           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     161             :                 // Error handled in mozilla::ipc::IPCResult
     162           0 :                 return MsgProcessingError;
     163             :             }
     164             : 
     165           0 :             return MsgProcessed;
     166             :         }
     167             :     case PContentPermissionRequest::Msg___delete____ID:
     168             :         {
     169           0 :             if (mozilla::ipc::LoggingEnabledFor("PContentPermissionRequestChild")) {
     170           0 :                 mozilla::ipc::LogMessageForProtocol("PContentPermissionRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     171             :             }
     172           0 :             AUTO_PROFILER_LABEL("PContentPermissionRequest::Msg___delete__", OTHER);
     173             : 
     174           0 :             PickleIterator iter__(msg__);
     175             :             PContentPermissionRequestChild* actor;
     176             : 
     177           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
     178           0 :                 FatalError("Error deserializing 'PContentPermissionRequestChild'");
     179           0 :                 return MsgValueError;
     180             :             }
     181             :             // Sentinel = 'actor'
     182           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
     183           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PContentPermissionRequestChild'");
     184           0 :                 return MsgValueError;
     185             :             }
     186           0 :             (msg__).EndRead(iter__, (msg__).type());
     187           0 :             PContentPermissionRequest::Transition(PContentPermissionRequest::Msg___delete____ID, (&(mState)));
     188           0 :             if ((!(Recv__delete__()))) {
     189           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     190             :                 // Error handled in mozilla::ipc::IPCResult
     191           0 :                 return MsgProcessingError;
     192             :             }
     193             : 
     194             : 
     195           0 :             IProtocol* mgr = (actor)->Manager();
     196           0 :             (actor)->DestroySubtree(Deletion);
     197           0 :             (actor)->DeallocSubtree();
     198           0 :             (mgr)->RemoveManagee(PContentPermissionRequestMsgStart, actor);
     199             : 
     200           0 :             return MsgProcessed;
     201             :         }
     202             :     default:
     203             :         {
     204           0 :             return MsgNotKnown;
     205             :         }
     206             :     }
     207             : }
     208             : 
     209           0 : auto PContentPermissionRequestChild::OnMessageReceived(
     210             :         const Message& msg__,
     211             :         Message*& reply__) -> PContentPermissionRequestChild::Result
     212             : {
     213           0 :     return MsgNotKnown;
     214             : }
     215             : 
     216           0 : auto PContentPermissionRequestChild::OnCallReceived(
     217             :         const Message& msg__,
     218             :         Message*& reply__) -> PContentPermissionRequestChild::Result
     219             : {
     220           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     221             :     return MsgNotKnown;
     222             : }
     223             : 
     224           0 : auto PContentPermissionRequestChild::GetProtocolTypeId() -> int32_t
     225             : {
     226           0 :     return PContentPermissionRequestMsgStart;
     227             : }
     228             : 
     229           0 : auto PContentPermissionRequestChild::ProtocolName() const -> const char*
     230             : {
     231           0 :     return "PContentPermissionRequestChild";
     232             : }
     233             : 
     234           0 : auto PContentPermissionRequestChild::DestroySubtree(ActorDestroyReason why) -> void
     235             : {
     236             :     // Unregister from our manager.
     237           0 :     Unregister(Id());
     238             : 
     239             :     // Reject owning pending promises.
     240           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     241             : 
     242             :     // Finally, destroy "us".
     243           0 :     ActorDestroy(why);
     244           0 : }
     245             : 
     246           0 : auto PContentPermissionRequestChild::DeallocSubtree() -> void
     247             : {
     248           0 : }
     249             : 
     250           0 : auto PContentPermissionRequestChild::Write(
     251             :         const nsTArray<PermissionChoice>& v__,
     252             :         Message* msg__) -> void
     253             : {
     254           0 :     uint32_t length = (v__).Length();
     255           0 :     Write(length, msg__);
     256             :     // Sentinel = ('length', 'PermissionChoice[]')
     257           0 :     (msg__)->WriteSentinel(2926411159);
     258             : 
     259           0 :     for (auto& elem : v__) {
     260           0 :         Write(elem, msg__);
     261             :         // Sentinel = 'PermissionChoice[]'
     262           0 :         (msg__)->WriteSentinel(2153190994);
     263             :     }
     264           0 : }
     265             : 
     266           0 : auto PContentPermissionRequestChild::Read(
     267             :         nsTArray<PermissionChoice>* v__,
     268             :         const Message* msg__,
     269             :         PickleIterator* iter__) -> bool
     270             : {
     271           0 :     nsTArray<PermissionChoice> fa;
     272             :     uint32_t length;
     273           0 :     if ((!(Read((&(length)), msg__, iter__)))) {
     274           0 :         mozilla::ipc::ArrayLengthReadError("PermissionChoice[]");
     275           0 :         return false;
     276             :     }
     277             :     // Sentinel = ('length', 'PermissionChoice[]')
     278           0 :     if ((!((msg__)->ReadSentinel(iter__, 2926411159)))) {
     279           0 :         mozilla::ipc::SentinelReadError("PermissionChoice[]");
     280           0 :         return false;
     281             :     }
     282             : 
     283           0 :     PermissionChoice* elems = (fa).AppendElements(length);
     284           0 :     for (uint32_t i = 0; (i) < (length); (++(i))) {
     285           0 :         if ((!(Read((&(elems[i])), msg__, iter__)))) {
     286           0 :             FatalError("Error deserializing 'PermissionChoice[i]'");
     287           0 :             return false;
     288             :         }
     289             :         // Sentinel = 'PermissionChoice[]'
     290           0 :         if ((!((msg__)->ReadSentinel(iter__, 2153190994)))) {
     291           0 :             mozilla::ipc::SentinelReadError("Error deserializing 'PermissionChoice[i]'");
     292           0 :             return false;
     293             :         }
     294             :     }
     295           0 :     (v__)->SwapElements(fa);
     296           0 :     return true;
     297             : }
     298             : 
     299           0 : auto PContentPermissionRequestChild::Write(
     300             :         const PermissionChoice& v__,
     301             :         Message* msg__) -> void
     302             : {
     303           0 :     Write((v__).type(), msg__);
     304             :     // Sentinel = 'type'
     305           0 :     (msg__)->WriteSentinel(2982068540);
     306           0 :     Write((v__).choice(), msg__);
     307             :     // Sentinel = 'choice'
     308           0 :     (msg__)->WriteSentinel(1920600143);
     309           0 : }
     310             : 
     311           0 : auto PContentPermissionRequestChild::Read(
     312             :         PermissionChoice* v__,
     313             :         const Message* msg__,
     314             :         PickleIterator* iter__) -> bool
     315             : {
     316           0 :     if ((!(Read((&((v__)->type())), msg__, iter__)))) {
     317           0 :         FatalError("Error deserializing 'type' (nsCString) member of 'PermissionChoice'");
     318           0 :         return false;
     319             :     }
     320             :     // Sentinel = 'type'
     321           0 :     if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
     322           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'type' (nsCString) member of 'PermissionChoice'");
     323           0 :         return false;
     324             :     }
     325           0 :     if ((!(Read((&((v__)->choice())), msg__, iter__)))) {
     326           0 :         FatalError("Error deserializing 'choice' (nsString) member of 'PermissionChoice'");
     327           0 :         return false;
     328             :     }
     329             :     // Sentinel = 'choice'
     330           0 :     if ((!((msg__)->ReadSentinel(iter__, 1920600143)))) {
     331           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'choice' (nsString) member of 'PermissionChoice'");
     332           0 :         return false;
     333             :     }
     334           0 :     return true;
     335             : }
     336             : 
     337           0 : auto PContentPermissionRequestChild::Write(
     338             :         const PContentPermissionRequestChild* v__,
     339             :         Message* msg__,
     340             :         bool nullable__) -> void
     341             : {
     342             :     int32_t id;
     343           0 :     if ((!(v__))) {
     344           0 :         if ((!(nullable__))) {
     345           0 :             FatalError("NULL actor value passed to non-nullable param");
     346             :         }
     347           0 :         id = 0;
     348             :     }
     349             :     else {
     350           0 :         id = (v__)->Id();
     351           0 :         if ((1) == (id)) {
     352           0 :             FatalError("actor has been |delete|d");
     353             :         }
     354             :     }
     355             : 
     356           0 :     Write(id, msg__);
     357           0 : }
     358             : 
     359           0 : auto PContentPermissionRequestChild::Read(
     360             :         PContentPermissionRequestChild** v__,
     361             :         const Message* msg__,
     362             :         PickleIterator* iter__,
     363             :         bool nullable__) -> bool
     364             : {
     365           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PContentPermissionRequest", PContentPermissionRequestMsgStart);
     366           0 :     if ((actor).isNothing()) {
     367           0 :         return false;
     368             :     }
     369             : 
     370           0 :     (*(v__)) = static_cast<PContentPermissionRequestChild*>((actor).value());
     371           0 :     return true;
     372             : }
     373             : 
     374             : 
     375             : 
     376             : } // namespace dom
     377             : } // namespace mozilla

Generated by: LCOV version 1.13