LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl - PPluginInstanceChild.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 1646 0 0.0 %
Date: 2012-06-02 Functions: 109 0 0.0 %

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : 
       7                 : #include "mozilla/plugins/PPluginInstanceChild.h"
       8                 : 
       9                 : #include "mozilla/plugins/PPluginBackgroundDestroyerChild.h"
      10                 : #include "mozilla/plugins/PPluginModuleChild.h"
      11                 : #include "mozilla/plugins/PPluginScriptableObjectChild.h"
      12                 : #include "mozilla/plugins/PBrowserStreamChild.h"
      13                 : #include "mozilla/plugins/PPluginStreamChild.h"
      14                 : #include "mozilla/plugins/PStreamNotifyChild.h"
      15                 : #include "mozilla/plugins/PPluginSurfaceChild.h"
      16                 : 
      17                 : typedef IPC::Message Message;
      18                 : typedef mozilla::ipc::RPCChannel Channel;
      19                 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      20                 : typedef base::ProcessHandle ProcessHandle;
      21                 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
      22                 : typedef mozilla::ipc::SharedMemory SharedMemory;
      23                 : typedef mozilla::ipc::Trigger Trigger;
      24                 : typedef mozilla::ipc::ActorHandle ActorHandle;
      25                 : typedef mozilla::plugins::IOSurfaceDescriptor IOSurfaceDescriptor;
      26                 : typedef mozilla::plugins::SurfaceDescriptor SurfaceDescriptor;
      27                 : typedef mozilla::plugins::OptionalShmem OptionalShmem;
      28                 : typedef mozilla::plugins::AsyncSurfaceDescriptor AsyncSurfaceDescriptor;
      29                 : typedef mozilla::plugins::NPRemoteAsyncSurface NPRemoteAsyncSurface;
      30                 : typedef mozilla::ipc::Shmem Shmem;
      31                 : typedef mozilla::plugins::NativeWindowHandle NativeWindowHandle;
      32                 : typedef mozilla::gfxSurfaceType gfxSurfaceType;
      33                 : typedef mozilla::null_t null_t;
      34                 : typedef mozilla::plugins::WindowsSharedMemoryHandle WindowsSharedMemoryHandle;
      35                 : typedef mozilla::plugins::DXGISharedSurfaceHandle DXGISharedSurfaceHandle;
      36                 : typedef mozilla::CrossProcessMutexHandle CrossProcessMutexHandle;
      37                 : using mozilla::plugins::PPluginBackgroundDestroyerChild;
      38                 : using mozilla::plugins::PPluginModuleChild;
      39                 : using mozilla::plugins::PPluginScriptableObjectChild;
      40                 : using mozilla::plugins::PBrowserStreamChild;
      41                 : using mozilla::plugins::PPluginStreamChild;
      42                 : using mozilla::plugins::PStreamNotifyChild;
      43                 : using mozilla::plugins::PPluginSurfaceChild;
      44                 : 
      45                 : namespace mozilla {
      46                 : namespace plugins {
      47                 : 
      48                 : 
      49                 : bool
      50               0 : PPluginInstanceChild::Answer__delete__()
      51                 : {
      52               0 :     return true;
      53                 : }
      54                 : 
      55                 : bool
      56               0 : PPluginInstanceChild::RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* actor)
      57                 : {
      58               0 :     return true;
      59                 : }
      60                 : 
      61                 : bool
      62               0 : PPluginInstanceChild::AnswerPBrowserStreamConstructor(
      63                 :         PBrowserStreamChild* actor,
      64                 :         const nsCString& url,
      65                 :         const uint32_t& length,
      66                 :         const uint32_t& lastmodified,
      67                 :         PStreamNotifyChild* notifyData,
      68                 :         const nsCString& headers,
      69                 :         const nsCString& mimeType,
      70                 :         const bool& seekable,
      71                 :         NPError* rv,
      72                 :         uint16_t* stype)
      73                 : {
      74               0 :     return true;
      75                 : }
      76                 : 
      77                 : bool
      78               0 : PPluginInstanceChild::RecvPPluginBackgroundDestroyerConstructor(PPluginBackgroundDestroyerChild* actor)
      79                 : {
      80               0 :     return true;
      81                 : }
      82                 : 
      83                 : void
      84               0 : PPluginInstanceChild::ActorDestroy(ActorDestroyReason why)
      85                 : {
      86               0 : }
      87                 : 
      88               0 : PPluginInstanceChild::PPluginInstanceChild() :
      89                 :     mId(0),
      90               0 :     mState(PPluginInstance::__Dead)
      91                 : {
      92               0 :     MOZ_COUNT_CTOR(PPluginInstanceChild);
      93               0 : }
      94                 : 
      95               0 : PPluginInstanceChild::~PPluginInstanceChild()
      96                 : {
      97               0 :     MOZ_COUNT_DTOR(PPluginInstanceChild);
      98               0 : }
      99                 : 
     100                 : PPluginModuleChild*
     101               0 : PPluginInstanceChild::Manager()
     102                 : {
     103               0 :     return static_cast<PPluginModuleChild*>(mManager);
     104                 : }
     105                 : 
     106                 : void
     107               0 : PPluginInstanceChild::ManagedPPluginBackgroundDestroyerChild(InfallibleTArray<PPluginBackgroundDestroyerChild*>& aArr) const
     108                 : {
     109               0 :     aArr = mManagedPPluginBackgroundDestroyerChild;
     110               0 : }
     111                 : 
     112                 : const InfallibleTArray<PPluginBackgroundDestroyerChild*>&
     113               0 : PPluginInstanceChild::ManagedPPluginBackgroundDestroyerChild() const
     114                 : {
     115               0 :     return mManagedPPluginBackgroundDestroyerChild;
     116                 : }
     117                 : 
     118                 : void
     119               0 : PPluginInstanceChild::ManagedPPluginScriptableObjectChild(InfallibleTArray<PPluginScriptableObjectChild*>& aArr) const
     120                 : {
     121               0 :     aArr = mManagedPPluginScriptableObjectChild;
     122               0 : }
     123                 : 
     124                 : const InfallibleTArray<PPluginScriptableObjectChild*>&
     125               0 : PPluginInstanceChild::ManagedPPluginScriptableObjectChild() const
     126                 : {
     127               0 :     return mManagedPPluginScriptableObjectChild;
     128                 : }
     129                 : 
     130                 : void
     131               0 : PPluginInstanceChild::ManagedPBrowserStreamChild(InfallibleTArray<PBrowserStreamChild*>& aArr) const
     132                 : {
     133               0 :     aArr = mManagedPBrowserStreamChild;
     134               0 : }
     135                 : 
     136                 : const InfallibleTArray<PBrowserStreamChild*>&
     137               0 : PPluginInstanceChild::ManagedPBrowserStreamChild() const
     138                 : {
     139               0 :     return mManagedPBrowserStreamChild;
     140                 : }
     141                 : 
     142                 : void
     143               0 : PPluginInstanceChild::ManagedPPluginStreamChild(InfallibleTArray<PPluginStreamChild*>& aArr) const
     144                 : {
     145               0 :     aArr = mManagedPPluginStreamChild;
     146               0 : }
     147                 : 
     148                 : const InfallibleTArray<PPluginStreamChild*>&
     149               0 : PPluginInstanceChild::ManagedPPluginStreamChild() const
     150                 : {
     151               0 :     return mManagedPPluginStreamChild;
     152                 : }
     153                 : 
     154                 : void
     155               0 : PPluginInstanceChild::ManagedPStreamNotifyChild(InfallibleTArray<PStreamNotifyChild*>& aArr) const
     156                 : {
     157               0 :     aArr = mManagedPStreamNotifyChild;
     158               0 : }
     159                 : 
     160                 : const InfallibleTArray<PStreamNotifyChild*>&
     161               0 : PPluginInstanceChild::ManagedPStreamNotifyChild() const
     162                 : {
     163               0 :     return mManagedPStreamNotifyChild;
     164                 : }
     165                 : 
     166                 : void
     167               0 : PPluginInstanceChild::ManagedPPluginSurfaceChild(InfallibleTArray<PPluginSurfaceChild*>& aArr) const
     168                 : {
     169               0 :     aArr = mManagedPPluginSurfaceChild;
     170               0 : }
     171                 : 
     172                 : const InfallibleTArray<PPluginSurfaceChild*>&
     173               0 : PPluginInstanceChild::ManagedPPluginSurfaceChild() const
     174                 : {
     175               0 :     return mManagedPPluginSurfaceChild;
     176                 : }
     177                 : 
     178                 : PPluginInstance::State
     179               0 : PPluginInstanceChild::state()
     180                 : {
     181               0 :     return mState;
     182                 : }
     183                 : 
     184                 : bool
     185               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVjavascriptEnabledBool(
     186                 :         bool* value,
     187                 :         NPError* result)
     188                 : {
     189               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVjavascriptEnabledBool* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVjavascriptEnabledBool();
     190                 : 
     191                 : 
     192               0 :     (__msg)->set_routing_id(mId);
     193               0 :     (__msg)->set_rpc();
     194                 : 
     195                 : 
     196               0 :     Message __reply;
     197                 : 
     198               0 :     if (mozilla::ipc::LoggingEnabled()) {
     199               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     200                 :     }
     201               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVjavascriptEnabledBool__ID), (&(mState)))))) {
     202               0 :         NS_WARNING("bad state transition!");
     203                 :     }
     204                 : 
     205               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     206               0 :     if ((!(__sendok))) {
     207               0 :         return false;
     208                 :     }
     209                 : 
     210               0 :     if (mozilla::ipc::LoggingEnabled()) {
     211               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVjavascriptEnabledBool*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     212                 :     }
     213                 : 
     214               0 :     void* __iter = 0;
     215               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
     216               0 :         FatalError("error deserializing (better message TODO)");
     217               0 :         return false;
     218                 :     }
     219               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     220               0 :         FatalError("error deserializing (better message TODO)");
     221               0 :         return false;
     222                 :     }
     223               0 :     (__reply).EndRead(__iter);
     224                 : 
     225               0 :     return true;
     226                 : }
     227                 : 
     228                 : bool
     229               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVisOfflineBool(
     230                 :         bool* value,
     231                 :         NPError* result)
     232                 : {
     233               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVisOfflineBool* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVisOfflineBool();
     234                 : 
     235                 : 
     236               0 :     (__msg)->set_routing_id(mId);
     237               0 :     (__msg)->set_rpc();
     238                 : 
     239                 : 
     240               0 :     Message __reply;
     241                 : 
     242               0 :     if (mozilla::ipc::LoggingEnabled()) {
     243               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     244                 :     }
     245               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVisOfflineBool__ID), (&(mState)))))) {
     246               0 :         NS_WARNING("bad state transition!");
     247                 :     }
     248                 : 
     249               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     250               0 :     if ((!(__sendok))) {
     251               0 :         return false;
     252                 :     }
     253                 : 
     254               0 :     if (mozilla::ipc::LoggingEnabled()) {
     255               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVisOfflineBool*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     256                 :     }
     257                 : 
     258               0 :     void* __iter = 0;
     259               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
     260               0 :         FatalError("error deserializing (better message TODO)");
     261               0 :         return false;
     262                 :     }
     263               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     264               0 :         FatalError("error deserializing (better message TODO)");
     265               0 :         return false;
     266                 :     }
     267               0 :     (__reply).EndRead(__iter);
     268                 : 
     269               0 :     return true;
     270                 : }
     271                 : 
     272                 : bool
     273               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVWindowNPObject(
     274                 :         PPluginScriptableObjectChild** value,
     275                 :         NPError* result)
     276                 : {
     277               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVWindowNPObject* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVWindowNPObject();
     278                 : 
     279                 : 
     280               0 :     (__msg)->set_routing_id(mId);
     281               0 :     (__msg)->set_rpc();
     282                 : 
     283                 : 
     284               0 :     Message __reply;
     285                 : 
     286               0 :     if (mozilla::ipc::LoggingEnabled()) {
     287               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     288                 :     }
     289               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVWindowNPObject__ID), (&(mState)))))) {
     290               0 :         NS_WARNING("bad state transition!");
     291                 :     }
     292                 : 
     293               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     294               0 :     if ((!(__sendok))) {
     295               0 :         return false;
     296                 :     }
     297                 : 
     298               0 :     if (mozilla::ipc::LoggingEnabled()) {
     299               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVWindowNPObject*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     300                 :     }
     301                 : 
     302               0 :     void* __iter = 0;
     303               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)), true)))) {
     304               0 :         FatalError("error deserializing (better message TODO)");
     305               0 :         return false;
     306                 :     }
     307               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     308               0 :         FatalError("error deserializing (better message TODO)");
     309               0 :         return false;
     310                 :     }
     311               0 :     (__reply).EndRead(__iter);
     312                 : 
     313               0 :     return true;
     314                 : }
     315                 : 
     316                 : bool
     317               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVPluginElementNPObject(
     318                 :         PPluginScriptableObjectChild** value,
     319                 :         NPError* result)
     320                 : {
     321               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVPluginElementNPObject* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVPluginElementNPObject();
     322                 : 
     323                 : 
     324               0 :     (__msg)->set_routing_id(mId);
     325               0 :     (__msg)->set_rpc();
     326                 : 
     327                 : 
     328               0 :     Message __reply;
     329                 : 
     330               0 :     if (mozilla::ipc::LoggingEnabled()) {
     331               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     332                 :     }
     333               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVPluginElementNPObject__ID), (&(mState)))))) {
     334               0 :         NS_WARNING("bad state transition!");
     335                 :     }
     336                 : 
     337               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     338               0 :     if ((!(__sendok))) {
     339               0 :         return false;
     340                 :     }
     341                 : 
     342               0 :     if (mozilla::ipc::LoggingEnabled()) {
     343               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVPluginElementNPObject*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     344                 :     }
     345                 : 
     346               0 :     void* __iter = 0;
     347               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)), true)))) {
     348               0 :         FatalError("error deserializing (better message TODO)");
     349               0 :         return false;
     350                 :     }
     351               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     352               0 :         FatalError("error deserializing (better message TODO)");
     353               0 :         return false;
     354                 :     }
     355               0 :     (__reply).EndRead(__iter);
     356                 : 
     357               0 :     return true;
     358                 : }
     359                 : 
     360                 : bool
     361               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVprivateModeBool(
     362                 :         bool* value,
     363                 :         NPError* result)
     364                 : {
     365               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVprivateModeBool* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVprivateModeBool();
     366                 : 
     367                 : 
     368               0 :     (__msg)->set_routing_id(mId);
     369               0 :     (__msg)->set_rpc();
     370                 : 
     371                 : 
     372               0 :     Message __reply;
     373                 : 
     374               0 :     if (mozilla::ipc::LoggingEnabled()) {
     375               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     376                 :     }
     377               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVprivateModeBool__ID), (&(mState)))))) {
     378               0 :         NS_WARNING("bad state transition!");
     379                 :     }
     380                 : 
     381               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     382               0 :     if ((!(__sendok))) {
     383               0 :         return false;
     384                 :     }
     385                 : 
     386               0 :     if (mozilla::ipc::LoggingEnabled()) {
     387               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVprivateModeBool*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     388                 :     }
     389                 : 
     390               0 :     void* __iter = 0;
     391               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
     392               0 :         FatalError("error deserializing (better message TODO)");
     393               0 :         return false;
     394                 :     }
     395               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     396               0 :         FatalError("error deserializing (better message TODO)");
     397               0 :         return false;
     398                 :     }
     399               0 :     (__reply).EndRead(__iter);
     400                 : 
     401               0 :     return true;
     402                 : }
     403                 : 
     404                 : bool
     405               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVnetscapeWindow(
     406                 :         NativeWindowHandle* value,
     407                 :         NPError* result)
     408                 : {
     409               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVnetscapeWindow* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVnetscapeWindow();
     410                 : 
     411                 : 
     412               0 :     (__msg)->set_routing_id(mId);
     413               0 :     (__msg)->set_rpc();
     414                 : 
     415                 : 
     416               0 :     Message __reply;
     417                 : 
     418               0 :     if (mozilla::ipc::LoggingEnabled()) {
     419               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     420                 :     }
     421               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVnetscapeWindow__ID), (&(mState)))))) {
     422               0 :         NS_WARNING("bad state transition!");
     423                 :     }
     424                 : 
     425               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     426               0 :     if ((!(__sendok))) {
     427               0 :         return false;
     428                 :     }
     429                 : 
     430               0 :     if (mozilla::ipc::LoggingEnabled()) {
     431               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVnetscapeWindow*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     432                 :     }
     433                 : 
     434               0 :     void* __iter = 0;
     435               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
     436               0 :         FatalError("error deserializing (better message TODO)");
     437               0 :         return false;
     438                 :     }
     439               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     440               0 :         FatalError("error deserializing (better message TODO)");
     441               0 :         return false;
     442                 :     }
     443               0 :     (__reply).EndRead(__iter);
     444                 : 
     445               0 :     return true;
     446                 : }
     447                 : 
     448                 : bool
     449               0 : PPluginInstanceChild::CallNPN_GetValue_NPNVdocumentOrigin(
     450                 :         nsCString* value,
     451                 :         NPError* result)
     452                 : {
     453               0 :     PPluginInstance::Msg_NPN_GetValue_NPNVdocumentOrigin* __msg = new PPluginInstance::Msg_NPN_GetValue_NPNVdocumentOrigin();
     454                 : 
     455                 : 
     456               0 :     (__msg)->set_routing_id(mId);
     457               0 :     (__msg)->set_rpc();
     458                 : 
     459                 : 
     460               0 :     Message __reply;
     461                 : 
     462               0 :     if (mozilla::ipc::LoggingEnabled()) {
     463               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     464                 :     }
     465               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValue_NPNVdocumentOrigin__ID), (&(mState)))))) {
     466               0 :         NS_WARNING("bad state transition!");
     467                 :     }
     468                 : 
     469               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     470               0 :     if ((!(__sendok))) {
     471               0 :         return false;
     472                 :     }
     473                 : 
     474               0 :     if (mozilla::ipc::LoggingEnabled()) {
     475               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValue_NPNVdocumentOrigin*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     476                 :     }
     477                 : 
     478               0 :     void* __iter = 0;
     479               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
     480               0 :         FatalError("error deserializing (better message TODO)");
     481               0 :         return false;
     482                 :     }
     483               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     484               0 :         FatalError("error deserializing (better message TODO)");
     485               0 :         return false;
     486                 :     }
     487               0 :     (__reply).EndRead(__iter);
     488                 : 
     489               0 :     return true;
     490                 : }
     491                 : 
     492                 : bool
     493               0 : PPluginInstanceChild::CallNPN_SetValue_NPPVpluginWindow(
     494                 :         const bool& windowed,
     495                 :         NPError* result)
     496                 : {
     497               0 :     PPluginInstance::Msg_NPN_SetValue_NPPVpluginWindow* __msg = new PPluginInstance::Msg_NPN_SetValue_NPPVpluginWindow();
     498                 : 
     499               0 :     Write(windowed, __msg);
     500                 : 
     501               0 :     (__msg)->set_routing_id(mId);
     502               0 :     (__msg)->set_rpc();
     503                 : 
     504                 : 
     505               0 :     Message __reply;
     506                 : 
     507               0 :     if (mozilla::ipc::LoggingEnabled()) {
     508               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     509                 :     }
     510               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValue_NPPVpluginWindow__ID), (&(mState)))))) {
     511               0 :         NS_WARNING("bad state transition!");
     512                 :     }
     513                 : 
     514               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     515               0 :     if ((!(__sendok))) {
     516               0 :         return false;
     517                 :     }
     518                 : 
     519               0 :     if (mozilla::ipc::LoggingEnabled()) {
     520               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValue_NPPVpluginWindow*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     521                 :     }
     522                 : 
     523               0 :     void* __iter = 0;
     524               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     525               0 :         FatalError("error deserializing (better message TODO)");
     526               0 :         return false;
     527                 :     }
     528               0 :     (__reply).EndRead(__iter);
     529                 : 
     530               0 :     return true;
     531                 : }
     532                 : 
     533                 : bool
     534               0 : PPluginInstanceChild::CallNPN_SetValue_NPPVpluginTransparent(
     535                 :         const bool& transparent,
     536                 :         NPError* result)
     537                 : {
     538               0 :     PPluginInstance::Msg_NPN_SetValue_NPPVpluginTransparent* __msg = new PPluginInstance::Msg_NPN_SetValue_NPPVpluginTransparent();
     539                 : 
     540               0 :     Write(transparent, __msg);
     541                 : 
     542               0 :     (__msg)->set_routing_id(mId);
     543               0 :     (__msg)->set_rpc();
     544                 : 
     545                 : 
     546               0 :     Message __reply;
     547                 : 
     548               0 :     if (mozilla::ipc::LoggingEnabled()) {
     549               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     550                 :     }
     551               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValue_NPPVpluginTransparent__ID), (&(mState)))))) {
     552               0 :         NS_WARNING("bad state transition!");
     553                 :     }
     554                 : 
     555               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     556               0 :     if ((!(__sendok))) {
     557               0 :         return false;
     558                 :     }
     559                 : 
     560               0 :     if (mozilla::ipc::LoggingEnabled()) {
     561               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValue_NPPVpluginTransparent*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     562                 :     }
     563                 : 
     564               0 :     void* __iter = 0;
     565               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     566               0 :         FatalError("error deserializing (better message TODO)");
     567               0 :         return false;
     568                 :     }
     569               0 :     (__reply).EndRead(__iter);
     570                 : 
     571               0 :     return true;
     572                 : }
     573                 : 
     574                 : bool
     575               0 : PPluginInstanceChild::CallNPN_SetValue_NPPVpluginUsesDOMForCursor(
     576                 :         const bool& useDOMForCursor,
     577                 :         NPError* result)
     578                 : {
     579               0 :     PPluginInstance::Msg_NPN_SetValue_NPPVpluginUsesDOMForCursor* __msg = new PPluginInstance::Msg_NPN_SetValue_NPPVpluginUsesDOMForCursor();
     580                 : 
     581               0 :     Write(useDOMForCursor, __msg);
     582                 : 
     583               0 :     (__msg)->set_routing_id(mId);
     584               0 :     (__msg)->set_rpc();
     585                 : 
     586                 : 
     587               0 :     Message __reply;
     588                 : 
     589               0 :     if (mozilla::ipc::LoggingEnabled()) {
     590               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     591                 :     }
     592               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValue_NPPVpluginUsesDOMForCursor__ID), (&(mState)))))) {
     593               0 :         NS_WARNING("bad state transition!");
     594                 :     }
     595                 : 
     596               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     597               0 :     if ((!(__sendok))) {
     598               0 :         return false;
     599                 :     }
     600                 : 
     601               0 :     if (mozilla::ipc::LoggingEnabled()) {
     602               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValue_NPPVpluginUsesDOMForCursor*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     603                 :     }
     604                 : 
     605               0 :     void* __iter = 0;
     606               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     607               0 :         FatalError("error deserializing (better message TODO)");
     608               0 :         return false;
     609                 :     }
     610               0 :     (__reply).EndRead(__iter);
     611                 : 
     612               0 :     return true;
     613                 : }
     614                 : 
     615                 : bool
     616               0 : PPluginInstanceChild::CallNPN_SetValue_NPPVpluginDrawingModel(
     617                 :         const int& drawingModel,
     618                 :         OptionalShmem* remoteImageData,
     619                 :         CrossProcessMutexHandle* mutex,
     620                 :         NPError* result)
     621                 : {
     622               0 :     PPluginInstance::Msg_NPN_SetValue_NPPVpluginDrawingModel* __msg = new PPluginInstance::Msg_NPN_SetValue_NPPVpluginDrawingModel();
     623                 : 
     624               0 :     Write(drawingModel, __msg);
     625                 : 
     626               0 :     (__msg)->set_routing_id(mId);
     627               0 :     (__msg)->set_rpc();
     628                 : 
     629                 : 
     630               0 :     Message __reply;
     631                 : 
     632               0 :     if (mozilla::ipc::LoggingEnabled()) {
     633               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     634                 :     }
     635               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValue_NPPVpluginDrawingModel__ID), (&(mState)))))) {
     636               0 :         NS_WARNING("bad state transition!");
     637                 :     }
     638                 : 
     639               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     640               0 :     if ((!(__sendok))) {
     641               0 :         return false;
     642                 :     }
     643                 : 
     644               0 :     if (mozilla::ipc::LoggingEnabled()) {
     645               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValue_NPPVpluginDrawingModel*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     646                 :     }
     647                 : 
     648               0 :     void* __iter = 0;
     649               0 :     if ((!(Read(remoteImageData, (&(__reply)), (&(__iter)))))) {
     650               0 :         FatalError("error deserializing (better message TODO)");
     651               0 :         return false;
     652                 :     }
     653               0 :     if ((!(Read(mutex, (&(__reply)), (&(__iter)))))) {
     654               0 :         FatalError("error deserializing (better message TODO)");
     655               0 :         return false;
     656                 :     }
     657               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     658               0 :         FatalError("error deserializing (better message TODO)");
     659               0 :         return false;
     660                 :     }
     661               0 :     (__reply).EndRead(__iter);
     662                 : 
     663               0 :     return true;
     664                 : }
     665                 : 
     666                 : bool
     667               0 : PPluginInstanceChild::CallNPN_SetValue_NPPVpluginEventModel(
     668                 :         const int& eventModel,
     669                 :         NPError* result)
     670                 : {
     671               0 :     PPluginInstance::Msg_NPN_SetValue_NPPVpluginEventModel* __msg = new PPluginInstance::Msg_NPN_SetValue_NPPVpluginEventModel();
     672                 : 
     673               0 :     Write(eventModel, __msg);
     674                 : 
     675               0 :     (__msg)->set_routing_id(mId);
     676               0 :     (__msg)->set_rpc();
     677                 : 
     678                 : 
     679               0 :     Message __reply;
     680                 : 
     681               0 :     if (mozilla::ipc::LoggingEnabled()) {
     682               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     683                 :     }
     684               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValue_NPPVpluginEventModel__ID), (&(mState)))))) {
     685               0 :         NS_WARNING("bad state transition!");
     686                 :     }
     687                 : 
     688               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     689               0 :     if ((!(__sendok))) {
     690               0 :         return false;
     691                 :     }
     692                 : 
     693               0 :     if (mozilla::ipc::LoggingEnabled()) {
     694               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValue_NPPVpluginEventModel*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     695                 :     }
     696                 : 
     697               0 :     void* __iter = 0;
     698               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     699               0 :         FatalError("error deserializing (better message TODO)");
     700               0 :         return false;
     701                 :     }
     702               0 :     (__reply).EndRead(__iter);
     703                 : 
     704               0 :     return true;
     705                 : }
     706                 : 
     707                 : bool
     708               0 : PPluginInstanceChild::CallNPN_GetURL(
     709                 :         const nsCString& url,
     710                 :         const nsCString& target,
     711                 :         NPError* result)
     712                 : {
     713               0 :     PPluginInstance::Msg_NPN_GetURL* __msg = new PPluginInstance::Msg_NPN_GetURL();
     714                 : 
     715               0 :     Write(url, __msg);
     716               0 :     Write(target, __msg);
     717                 : 
     718               0 :     (__msg)->set_routing_id(mId);
     719               0 :     (__msg)->set_rpc();
     720                 : 
     721                 : 
     722               0 :     Message __reply;
     723                 : 
     724               0 :     if (mozilla::ipc::LoggingEnabled()) {
     725               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     726                 :     }
     727               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetURL__ID), (&(mState)))))) {
     728               0 :         NS_WARNING("bad state transition!");
     729                 :     }
     730                 : 
     731               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     732               0 :     if ((!(__sendok))) {
     733               0 :         return false;
     734                 :     }
     735                 : 
     736               0 :     if (mozilla::ipc::LoggingEnabled()) {
     737               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetURL*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     738                 :     }
     739                 : 
     740               0 :     void* __iter = 0;
     741               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     742               0 :         FatalError("error deserializing (better message TODO)");
     743               0 :         return false;
     744                 :     }
     745               0 :     (__reply).EndRead(__iter);
     746                 : 
     747               0 :     return true;
     748                 : }
     749                 : 
     750                 : bool
     751               0 : PPluginInstanceChild::CallNPN_PostURL(
     752                 :         const nsCString& url,
     753                 :         const nsCString& target,
     754                 :         const nsCString& buffer,
     755                 :         const bool& file,
     756                 :         NPError* result)
     757                 : {
     758               0 :     PPluginInstance::Msg_NPN_PostURL* __msg = new PPluginInstance::Msg_NPN_PostURL();
     759                 : 
     760               0 :     Write(url, __msg);
     761               0 :     Write(target, __msg);
     762               0 :     Write(buffer, __msg);
     763               0 :     Write(file, __msg);
     764                 : 
     765               0 :     (__msg)->set_routing_id(mId);
     766               0 :     (__msg)->set_rpc();
     767                 : 
     768                 : 
     769               0 :     Message __reply;
     770                 : 
     771               0 :     if (mozilla::ipc::LoggingEnabled()) {
     772               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     773                 :     }
     774               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_PostURL__ID), (&(mState)))))) {
     775               0 :         NS_WARNING("bad state transition!");
     776                 :     }
     777                 : 
     778               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     779               0 :     if ((!(__sendok))) {
     780               0 :         return false;
     781                 :     }
     782                 : 
     783               0 :     if (mozilla::ipc::LoggingEnabled()) {
     784               0 :         (static_cast<const PPluginInstance::Reply_NPN_PostURL*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     785                 :     }
     786                 : 
     787               0 :     void* __iter = 0;
     788               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     789               0 :         FatalError("error deserializing (better message TODO)");
     790               0 :         return false;
     791                 :     }
     792               0 :     (__reply).EndRead(__iter);
     793                 : 
     794               0 :     return true;
     795                 : }
     796                 : 
     797                 : PStreamNotifyChild*
     798               0 : PPluginInstanceChild::CallPStreamNotifyConstructor(
     799                 :         const nsCString& url,
     800                 :         const nsCString& target,
     801                 :         const bool& post,
     802                 :         const nsCString& buffer,
     803                 :         const bool& file,
     804                 :         NPError* result)
     805                 : {
     806               0 :     return CallPStreamNotifyConstructor(AllocPStreamNotify(url, target, post, buffer, file, result), url, target, post, buffer, file, result);
     807                 : }
     808                 : 
     809                 : PStreamNotifyChild*
     810               0 : PPluginInstanceChild::CallPStreamNotifyConstructor(
     811                 :         PStreamNotifyChild* actor,
     812                 :         const nsCString& url,
     813                 :         const nsCString& target,
     814                 :         const bool& post,
     815                 :         const nsCString& buffer,
     816                 :         const bool& file,
     817                 :         NPError* result)
     818                 : {
     819               0 :     if ((!(actor))) {
     820               0 :         return 0;
     821                 :     }
     822               0 :     (actor)->mId = Register(actor);
     823               0 :     (actor)->mManager = this;
     824               0 :     (actor)->mChannel = mChannel;
     825               0 :     (mManagedPStreamNotifyChild).InsertElementSorted(actor);
     826               0 :     (actor)->mState = mozilla::plugins::PStreamNotify::__Start;
     827                 : 
     828               0 :     PPluginInstance::Msg_PStreamNotifyConstructor* __msg = new PPluginInstance::Msg_PStreamNotifyConstructor();
     829                 : 
     830               0 :     Write(actor, __msg, false);
     831               0 :     Write(url, __msg);
     832               0 :     Write(target, __msg);
     833               0 :     Write(post, __msg);
     834               0 :     Write(buffer, __msg);
     835               0 :     Write(file, __msg);
     836                 : 
     837               0 :     (__msg)->set_routing_id(mId);
     838               0 :     (__msg)->set_rpc();
     839                 : 
     840                 : 
     841               0 :     Message __reply;
     842                 : 
     843               0 :     if (mozilla::ipc::LoggingEnabled()) {
     844               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     845                 :     }
     846               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_PStreamNotifyConstructor__ID), (&(mState)))))) {
     847               0 :         NS_WARNING("bad state transition!");
     848                 :     }
     849                 : 
     850               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     851               0 :     if ((!(__sendok))) {
     852               0 :         (actor)->DestroySubtree(FailedConstructor);
     853               0 :         (actor)->DeallocSubtree();
     854               0 :         ((actor)->mManager)->RemoveManagee(PStreamNotifyMsgStart, actor);
     855               0 :         return 0;
     856                 :     }
     857                 : 
     858               0 :     if (mozilla::ipc::LoggingEnabled()) {
     859               0 :         (static_cast<const PPluginInstance::Reply_PStreamNotifyConstructor*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     860                 :     }
     861                 : 
     862               0 :     void* __iter = 0;
     863               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
     864                 :         if (true) {
     865               0 :             (actor)->DestroySubtree(FailedConstructor);
     866               0 :             (actor)->DeallocSubtree();
     867               0 :             ((actor)->mManager)->RemoveManagee(PStreamNotifyMsgStart, actor);
     868               0 :             return 0;
     869                 :         }
     870                 :     }
     871               0 :     (__reply).EndRead(__iter);
     872               0 :     return actor;
     873                 : }
     874                 : 
     875                 : bool
     876               0 : PPluginInstanceChild::SendNPN_InvalidateRect(const NPRect& rect)
     877                 : {
     878               0 :     PPluginInstance::Msg_NPN_InvalidateRect* __msg = new PPluginInstance::Msg_NPN_InvalidateRect();
     879                 : 
     880               0 :     Write(rect, __msg);
     881                 : 
     882               0 :     (__msg)->set_routing_id(mId);
     883                 : 
     884                 : 
     885                 : 
     886               0 :     if (mozilla::ipc::LoggingEnabled()) {
     887               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     888                 :     }
     889               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_InvalidateRect__ID), (&(mState)))))) {
     890               0 :         NS_WARNING("bad state transition!");
     891                 :     }
     892                 : 
     893               0 :     bool __sendok = (mChannel)->Send(__msg);
     894               0 :     return __sendok;
     895                 : }
     896                 : 
     897                 : bool
     898               0 : PPluginInstanceChild::SendShow(
     899                 :         const NPRect& updatedRect,
     900                 :         const SurfaceDescriptor& newSurface,
     901                 :         SurfaceDescriptor* prevSurface)
     902                 : {
     903               0 :     PPluginInstance::Msg_Show* __msg = new PPluginInstance::Msg_Show();
     904                 : 
     905               0 :     Write(updatedRect, __msg);
     906               0 :     Write(newSurface, __msg);
     907                 : 
     908               0 :     (__msg)->set_routing_id(mId);
     909               0 :     (__msg)->set_sync();
     910                 : 
     911                 : 
     912               0 :     Message __reply;
     913                 : 
     914               0 :     if (mozilla::ipc::LoggingEnabled()) {
     915               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     916                 :     }
     917               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_Show__ID), (&(mState)))))) {
     918               0 :         NS_WARNING("bad state transition!");
     919                 :     }
     920                 : 
     921               0 :     bool __sendok = (mChannel)->Send(__msg, (&(__reply)));
     922               0 :     if ((!(__sendok))) {
     923               0 :         return false;
     924                 :     }
     925                 : 
     926               0 :     if (mozilla::ipc::LoggingEnabled()) {
     927               0 :         (static_cast<const PPluginInstance::Reply_Show*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
     928                 :     }
     929                 : 
     930               0 :     void* __iter = 0;
     931               0 :     if ((!(Read(prevSurface, (&(__reply)), (&(__iter)))))) {
     932               0 :         FatalError("error deserializing (better message TODO)");
     933               0 :         return false;
     934                 :     }
     935               0 :     (__reply).EndRead(__iter);
     936                 : 
     937               0 :     return true;
     938                 : }
     939                 : 
     940                 : PPluginSurfaceChild*
     941               0 : PPluginInstanceChild::SendPPluginSurfaceConstructor(
     942                 :         const WindowsSharedMemoryHandle& handle,
     943                 :         const gfxIntSize& size,
     944                 :         const bool& transparent)
     945                 : {
     946               0 :     return SendPPluginSurfaceConstructor(AllocPPluginSurface(handle, size, transparent), handle, size, transparent);
     947                 : }
     948                 : 
     949                 : PPluginSurfaceChild*
     950               0 : PPluginInstanceChild::SendPPluginSurfaceConstructor(
     951                 :         PPluginSurfaceChild* actor,
     952                 :         const WindowsSharedMemoryHandle& handle,
     953                 :         const gfxIntSize& size,
     954                 :         const bool& transparent)
     955                 : {
     956               0 :     if ((!(actor))) {
     957               0 :         return 0;
     958                 :     }
     959               0 :     (actor)->mId = Register(actor);
     960               0 :     (actor)->mManager = this;
     961               0 :     (actor)->mChannel = mChannel;
     962               0 :     (mManagedPPluginSurfaceChild).InsertElementSorted(actor);
     963               0 :     (actor)->mState = mozilla::plugins::PPluginSurface::__Start;
     964                 : 
     965               0 :     PPluginInstance::Msg_PPluginSurfaceConstructor* __msg = new PPluginInstance::Msg_PPluginSurfaceConstructor();
     966                 : 
     967               0 :     Write(actor, __msg, false);
     968               0 :     Write(handle, __msg);
     969               0 :     Write(size, __msg);
     970               0 :     Write(transparent, __msg);
     971                 : 
     972               0 :     (__msg)->set_routing_id(mId);
     973                 : 
     974                 : 
     975               0 :     if (mozilla::ipc::LoggingEnabled()) {
     976               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
     977                 :     }
     978               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_PPluginSurfaceConstructor__ID), (&(mState)))))) {
     979               0 :         NS_WARNING("bad state transition!");
     980                 :     }
     981                 : 
     982               0 :     bool __sendok = (mChannel)->Send(__msg);
     983               0 :     if ((!(__sendok))) {
     984               0 :         (actor)->DestroySubtree(FailedConstructor);
     985               0 :         (actor)->DeallocSubtree();
     986               0 :         ((actor)->mManager)->RemoveManagee(PPluginSurfaceMsgStart, actor);
     987               0 :         return 0;
     988                 :     }
     989               0 :     return actor;
     990                 : }
     991                 : 
     992                 : bool
     993               0 : PPluginInstanceChild::CallNPN_PushPopupsEnabledState(const bool& aState)
     994                 : {
     995               0 :     PPluginInstance::Msg_NPN_PushPopupsEnabledState* __msg = new PPluginInstance::Msg_NPN_PushPopupsEnabledState();
     996                 : 
     997               0 :     Write(aState, __msg);
     998                 : 
     999               0 :     (__msg)->set_routing_id(mId);
    1000               0 :     (__msg)->set_rpc();
    1001                 : 
    1002                 : 
    1003               0 :     Message __reply;
    1004                 : 
    1005               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1006               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1007                 :     }
    1008               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_PushPopupsEnabledState__ID), (&(mState)))))) {
    1009               0 :         NS_WARNING("bad state transition!");
    1010                 :     }
    1011                 : 
    1012               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1013               0 :     if ((!(__sendok))) {
    1014               0 :         return false;
    1015                 :     }
    1016                 : 
    1017               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1018               0 :         (static_cast<const PPluginInstance::Reply_NPN_PushPopupsEnabledState*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1019                 :     }
    1020                 : 
    1021               0 :     return true;
    1022                 : }
    1023                 : 
    1024                 : bool
    1025               0 : PPluginInstanceChild::CallNPN_PopPopupsEnabledState()
    1026                 : {
    1027               0 :     PPluginInstance::Msg_NPN_PopPopupsEnabledState* __msg = new PPluginInstance::Msg_NPN_PopPopupsEnabledState();
    1028                 : 
    1029                 : 
    1030               0 :     (__msg)->set_routing_id(mId);
    1031               0 :     (__msg)->set_rpc();
    1032                 : 
    1033                 : 
    1034               0 :     Message __reply;
    1035                 : 
    1036               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1037               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1038                 :     }
    1039               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_PopPopupsEnabledState__ID), (&(mState)))))) {
    1040               0 :         NS_WARNING("bad state transition!");
    1041                 :     }
    1042                 : 
    1043               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1044               0 :     if ((!(__sendok))) {
    1045               0 :         return false;
    1046                 :     }
    1047                 : 
    1048               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1049               0 :         (static_cast<const PPluginInstance::Reply_NPN_PopPopupsEnabledState*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1050                 :     }
    1051                 : 
    1052               0 :     return true;
    1053                 : }
    1054                 : 
    1055                 : bool
    1056               0 : PPluginInstanceChild::CallNPN_GetValueForURL(
    1057                 :         const NPNURLVariable& variable,
    1058                 :         const nsCString& url,
    1059                 :         nsCString* value,
    1060                 :         NPError* result)
    1061                 : {
    1062               0 :     PPluginInstance::Msg_NPN_GetValueForURL* __msg = new PPluginInstance::Msg_NPN_GetValueForURL();
    1063                 : 
    1064               0 :     Write(variable, __msg);
    1065               0 :     Write(url, __msg);
    1066                 : 
    1067               0 :     (__msg)->set_routing_id(mId);
    1068               0 :     (__msg)->set_rpc();
    1069                 : 
    1070                 : 
    1071               0 :     Message __reply;
    1072                 : 
    1073               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1074               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1075                 :     }
    1076               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetValueForURL__ID), (&(mState)))))) {
    1077               0 :         NS_WARNING("bad state transition!");
    1078                 :     }
    1079                 : 
    1080               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1081               0 :     if ((!(__sendok))) {
    1082               0 :         return false;
    1083                 :     }
    1084                 : 
    1085               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1086               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetValueForURL*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1087                 :     }
    1088                 : 
    1089               0 :     void* __iter = 0;
    1090               0 :     if ((!(Read(value, (&(__reply)), (&(__iter)))))) {
    1091               0 :         FatalError("error deserializing (better message TODO)");
    1092               0 :         return false;
    1093                 :     }
    1094               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1095               0 :         FatalError("error deserializing (better message TODO)");
    1096               0 :         return false;
    1097                 :     }
    1098               0 :     (__reply).EndRead(__iter);
    1099                 : 
    1100               0 :     return true;
    1101                 : }
    1102                 : 
    1103                 : bool
    1104               0 : PPluginInstanceChild::CallNPN_SetValueForURL(
    1105                 :         const NPNURLVariable& variable,
    1106                 :         const nsCString& url,
    1107                 :         const nsCString& value,
    1108                 :         NPError* result)
    1109                 : {
    1110               0 :     PPluginInstance::Msg_NPN_SetValueForURL* __msg = new PPluginInstance::Msg_NPN_SetValueForURL();
    1111                 : 
    1112               0 :     Write(variable, __msg);
    1113               0 :     Write(url, __msg);
    1114               0 :     Write(value, __msg);
    1115                 : 
    1116               0 :     (__msg)->set_routing_id(mId);
    1117               0 :     (__msg)->set_rpc();
    1118                 : 
    1119                 : 
    1120               0 :     Message __reply;
    1121                 : 
    1122               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1123               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1124                 :     }
    1125               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_SetValueForURL__ID), (&(mState)))))) {
    1126               0 :         NS_WARNING("bad state transition!");
    1127                 :     }
    1128                 : 
    1129               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1130               0 :     if ((!(__sendok))) {
    1131               0 :         return false;
    1132                 :     }
    1133                 : 
    1134               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1135               0 :         (static_cast<const PPluginInstance::Reply_NPN_SetValueForURL*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1136                 :     }
    1137                 : 
    1138               0 :     void* __iter = 0;
    1139               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1140               0 :         FatalError("error deserializing (better message TODO)");
    1141               0 :         return false;
    1142                 :     }
    1143               0 :     (__reply).EndRead(__iter);
    1144                 : 
    1145               0 :     return true;
    1146                 : }
    1147                 : 
    1148                 : bool
    1149               0 : PPluginInstanceChild::CallNPN_GetAuthenticationInfo(
    1150                 :         const nsCString& protocol_,
    1151                 :         const nsCString& host,
    1152                 :         const int32_t& port,
    1153                 :         const nsCString& scheme,
    1154                 :         const nsCString& realm,
    1155                 :         nsCString* username,
    1156                 :         nsCString* password,
    1157                 :         NPError* result)
    1158                 : {
    1159               0 :     PPluginInstance::Msg_NPN_GetAuthenticationInfo* __msg = new PPluginInstance::Msg_NPN_GetAuthenticationInfo();
    1160                 : 
    1161               0 :     Write(protocol_, __msg);
    1162               0 :     Write(host, __msg);
    1163               0 :     Write(port, __msg);
    1164               0 :     Write(scheme, __msg);
    1165               0 :     Write(realm, __msg);
    1166                 : 
    1167               0 :     (__msg)->set_routing_id(mId);
    1168               0 :     (__msg)->set_rpc();
    1169                 : 
    1170                 : 
    1171               0 :     Message __reply;
    1172                 : 
    1173               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1174               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1175                 :     }
    1176               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_GetAuthenticationInfo__ID), (&(mState)))))) {
    1177               0 :         NS_WARNING("bad state transition!");
    1178                 :     }
    1179                 : 
    1180               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1181               0 :     if ((!(__sendok))) {
    1182               0 :         return false;
    1183                 :     }
    1184                 : 
    1185               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1186               0 :         (static_cast<const PPluginInstance::Reply_NPN_GetAuthenticationInfo*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1187                 :     }
    1188                 : 
    1189               0 :     void* __iter = 0;
    1190               0 :     if ((!(Read(username, (&(__reply)), (&(__iter)))))) {
    1191               0 :         FatalError("error deserializing (better message TODO)");
    1192               0 :         return false;
    1193                 :     }
    1194               0 :     if ((!(Read(password, (&(__reply)), (&(__iter)))))) {
    1195               0 :         FatalError("error deserializing (better message TODO)");
    1196               0 :         return false;
    1197                 :     }
    1198               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1199               0 :         FatalError("error deserializing (better message TODO)");
    1200               0 :         return false;
    1201                 :     }
    1202               0 :     (__reply).EndRead(__iter);
    1203                 : 
    1204               0 :     return true;
    1205                 : }
    1206                 : 
    1207                 : bool
    1208               0 : PPluginInstanceChild::CallNPN_ConvertPoint(
    1209                 :         const double& sourceX,
    1210                 :         const bool& ignoreDestX,
    1211                 :         const double& sourceY,
    1212                 :         const bool& ignoreDestY,
    1213                 :         const NPCoordinateSpace& sourceSpace,
    1214                 :         const NPCoordinateSpace& destSpace,
    1215                 :         double* destX,
    1216                 :         double* destY,
    1217                 :         bool* result)
    1218                 : {
    1219               0 :     PPluginInstance::Msg_NPN_ConvertPoint* __msg = new PPluginInstance::Msg_NPN_ConvertPoint();
    1220                 : 
    1221               0 :     Write(sourceX, __msg);
    1222               0 :     Write(ignoreDestX, __msg);
    1223               0 :     Write(sourceY, __msg);
    1224               0 :     Write(ignoreDestY, __msg);
    1225               0 :     Write(sourceSpace, __msg);
    1226               0 :     Write(destSpace, __msg);
    1227                 : 
    1228               0 :     (__msg)->set_routing_id(mId);
    1229               0 :     (__msg)->set_rpc();
    1230                 : 
    1231                 : 
    1232               0 :     Message __reply;
    1233                 : 
    1234               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1235               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1236                 :     }
    1237               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_ConvertPoint__ID), (&(mState)))))) {
    1238               0 :         NS_WARNING("bad state transition!");
    1239                 :     }
    1240                 : 
    1241               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1242               0 :     if ((!(__sendok))) {
    1243               0 :         return false;
    1244                 :     }
    1245                 : 
    1246               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1247               0 :         (static_cast<const PPluginInstance::Reply_NPN_ConvertPoint*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1248                 :     }
    1249                 : 
    1250               0 :     void* __iter = 0;
    1251               0 :     if ((!(Read(destX, (&(__reply)), (&(__iter)))))) {
    1252               0 :         FatalError("error deserializing (better message TODO)");
    1253               0 :         return false;
    1254                 :     }
    1255               0 :     if ((!(Read(destY, (&(__reply)), (&(__iter)))))) {
    1256               0 :         FatalError("error deserializing (better message TODO)");
    1257               0 :         return false;
    1258                 :     }
    1259               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1260               0 :         FatalError("error deserializing (better message TODO)");
    1261               0 :         return false;
    1262                 :     }
    1263               0 :     (__reply).EndRead(__iter);
    1264                 : 
    1265               0 :     return true;
    1266                 : }
    1267                 : 
    1268                 : bool
    1269               0 : PPluginInstanceChild::SendRedrawPlugin()
    1270                 : {
    1271               0 :     PPluginInstance::Msg_RedrawPlugin* __msg = new PPluginInstance::Msg_RedrawPlugin();
    1272                 : 
    1273                 : 
    1274               0 :     (__msg)->set_routing_id(mId);
    1275                 : 
    1276                 : 
    1277                 : 
    1278               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1279               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1280                 :     }
    1281               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_RedrawPlugin__ID), (&(mState)))))) {
    1282               0 :         NS_WARNING("bad state transition!");
    1283                 :     }
    1284                 : 
    1285               0 :     bool __sendok = (mChannel)->Send(__msg);
    1286               0 :     return __sendok;
    1287                 : }
    1288                 : 
    1289                 : bool
    1290               0 : PPluginInstanceChild::CallNPN_InitAsyncSurface(
    1291                 :         const gfxIntSize& size,
    1292                 :         const NPImageFormat& format,
    1293                 :         NPRemoteAsyncSurface* surfData,
    1294                 :         bool* result)
    1295                 : {
    1296               0 :     PPluginInstance::Msg_NPN_InitAsyncSurface* __msg = new PPluginInstance::Msg_NPN_InitAsyncSurface();
    1297                 : 
    1298               0 :     Write(size, __msg);
    1299               0 :     Write(format, __msg);
    1300                 : 
    1301               0 :     (__msg)->set_routing_id(mId);
    1302               0 :     (__msg)->set_rpc();
    1303                 : 
    1304                 : 
    1305               0 :     Message __reply;
    1306                 : 
    1307               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1308               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1309                 :     }
    1310               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NPN_InitAsyncSurface__ID), (&(mState)))))) {
    1311               0 :         NS_WARNING("bad state transition!");
    1312                 :     }
    1313                 : 
    1314               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1315               0 :     if ((!(__sendok))) {
    1316               0 :         return false;
    1317                 :     }
    1318                 : 
    1319               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1320               0 :         (static_cast<const PPluginInstance::Reply_NPN_InitAsyncSurface*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1321                 :     }
    1322                 : 
    1323               0 :     void* __iter = 0;
    1324               0 :     if ((!(Read(surfData, (&(__reply)), (&(__iter)))))) {
    1325               0 :         FatalError("error deserializing (better message TODO)");
    1326               0 :         return false;
    1327                 :     }
    1328               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1329               0 :         FatalError("error deserializing (better message TODO)");
    1330               0 :         return false;
    1331                 :     }
    1332               0 :     (__reply).EndRead(__iter);
    1333                 : 
    1334               0 :     return true;
    1335                 : }
    1336                 : 
    1337                 : bool
    1338               0 : PPluginInstanceChild::SendNegotiatedCarbon()
    1339                 : {
    1340               0 :     PPluginInstance::Msg_NegotiatedCarbon* __msg = new PPluginInstance::Msg_NegotiatedCarbon();
    1341                 : 
    1342                 : 
    1343               0 :     (__msg)->set_routing_id(mId);
    1344               0 :     (__msg)->set_sync();
    1345                 : 
    1346                 : 
    1347               0 :     Message __reply;
    1348                 : 
    1349               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1350               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1351                 :     }
    1352               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_NegotiatedCarbon__ID), (&(mState)))))) {
    1353               0 :         NS_WARNING("bad state transition!");
    1354                 :     }
    1355                 : 
    1356               0 :     bool __sendok = (mChannel)->Send(__msg, (&(__reply)));
    1357               0 :     if ((!(__sendok))) {
    1358               0 :         return false;
    1359                 :     }
    1360                 : 
    1361               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1362               0 :         (static_cast<const PPluginInstance::Reply_NegotiatedCarbon*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1363                 :     }
    1364                 : 
    1365               0 :     return true;
    1366                 : }
    1367                 : 
    1368                 : PPluginScriptableObjectChild*
    1369               0 : PPluginInstanceChild::SendPPluginScriptableObjectConstructor()
    1370                 : {
    1371               0 :     return SendPPluginScriptableObjectConstructor(AllocPPluginScriptableObject());
    1372                 : }
    1373                 : 
    1374                 : PPluginScriptableObjectChild*
    1375               0 : PPluginInstanceChild::SendPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* actor)
    1376                 : {
    1377               0 :     if ((!(actor))) {
    1378               0 :         return 0;
    1379                 :     }
    1380               0 :     (actor)->mId = Register(actor);
    1381               0 :     (actor)->mManager = this;
    1382               0 :     (actor)->mChannel = mChannel;
    1383               0 :     (mManagedPPluginScriptableObjectChild).InsertElementSorted(actor);
    1384               0 :     (actor)->mState = mozilla::plugins::PPluginScriptableObject::__Start;
    1385                 : 
    1386               0 :     PPluginInstance::Msg_PPluginScriptableObjectConstructor* __msg = new PPluginInstance::Msg_PPluginScriptableObjectConstructor();
    1387                 : 
    1388               0 :     Write(actor, __msg, false);
    1389                 : 
    1390               0 :     (__msg)->set_routing_id(mId);
    1391                 : 
    1392                 : 
    1393               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1394               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1395                 :     }
    1396               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_PPluginScriptableObjectConstructor__ID), (&(mState)))))) {
    1397               0 :         NS_WARNING("bad state transition!");
    1398                 :     }
    1399                 : 
    1400               0 :     bool __sendok = (mChannel)->Send(__msg);
    1401               0 :     if ((!(__sendok))) {
    1402               0 :         (actor)->DestroySubtree(FailedConstructor);
    1403               0 :         (actor)->DeallocSubtree();
    1404               0 :         ((actor)->mManager)->RemoveManagee(PPluginScriptableObjectMsgStart, actor);
    1405               0 :         return 0;
    1406                 :     }
    1407               0 :     return actor;
    1408                 : }
    1409                 : 
    1410                 : PPluginStreamChild*
    1411               0 : PPluginInstanceChild::CallPPluginStreamConstructor(
    1412                 :         const nsCString& mimeType,
    1413                 :         const nsCString& target,
    1414                 :         NPError* result)
    1415                 : {
    1416               0 :     return CallPPluginStreamConstructor(AllocPPluginStream(mimeType, target, result), mimeType, target, result);
    1417                 : }
    1418                 : 
    1419                 : PPluginStreamChild*
    1420               0 : PPluginInstanceChild::CallPPluginStreamConstructor(
    1421                 :         PPluginStreamChild* actor,
    1422                 :         const nsCString& mimeType,
    1423                 :         const nsCString& target,
    1424                 :         NPError* result)
    1425                 : {
    1426               0 :     if ((!(actor))) {
    1427               0 :         return 0;
    1428                 :     }
    1429               0 :     (actor)->mId = Register(actor);
    1430               0 :     (actor)->mManager = this;
    1431               0 :     (actor)->mChannel = mChannel;
    1432               0 :     (mManagedPPluginStreamChild).InsertElementSorted(actor);
    1433               0 :     (actor)->mState = mozilla::plugins::PPluginStream::__Start;
    1434                 : 
    1435               0 :     PPluginInstance::Msg_PPluginStreamConstructor* __msg = new PPluginInstance::Msg_PPluginStreamConstructor();
    1436                 : 
    1437               0 :     Write(actor, __msg, false);
    1438               0 :     Write(mimeType, __msg);
    1439               0 :     Write(target, __msg);
    1440                 : 
    1441               0 :     (__msg)->set_routing_id(mId);
    1442               0 :     (__msg)->set_rpc();
    1443                 : 
    1444                 : 
    1445               0 :     Message __reply;
    1446                 : 
    1447               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1448               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1449                 :     }
    1450               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_PPluginStreamConstructor__ID), (&(mState)))))) {
    1451               0 :         NS_WARNING("bad state transition!");
    1452                 :     }
    1453                 : 
    1454               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1455               0 :     if ((!(__sendok))) {
    1456               0 :         (actor)->DestroySubtree(FailedConstructor);
    1457               0 :         (actor)->DeallocSubtree();
    1458               0 :         ((actor)->mManager)->RemoveManagee(PPluginStreamMsgStart, actor);
    1459               0 :         return 0;
    1460                 :     }
    1461                 : 
    1462               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1463               0 :         (static_cast<const PPluginInstance::Reply_PPluginStreamConstructor*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1464                 :     }
    1465                 : 
    1466               0 :     void* __iter = 0;
    1467               0 :     if ((!(Read(result, (&(__reply)), (&(__iter)))))) {
    1468                 :         if (true) {
    1469               0 :             (actor)->DestroySubtree(FailedConstructor);
    1470               0 :             (actor)->DeallocSubtree();
    1471               0 :             ((actor)->mManager)->RemoveManagee(PPluginStreamMsgStart, actor);
    1472               0 :             return 0;
    1473                 :         }
    1474                 :     }
    1475               0 :     (__reply).EndRead(__iter);
    1476               0 :     return actor;
    1477                 : }
    1478                 : 
    1479                 : bool
    1480               0 : PPluginInstanceChild::CallPluginFocusChange(const bool& gotFocus)
    1481                 : {
    1482               0 :     PPluginInstance::Msg_PluginFocusChange* __msg = new PPluginInstance::Msg_PluginFocusChange();
    1483                 : 
    1484               0 :     Write(gotFocus, __msg);
    1485                 : 
    1486               0 :     (__msg)->set_routing_id(mId);
    1487               0 :     (__msg)->set_rpc();
    1488                 : 
    1489                 : 
    1490               0 :     Message __reply;
    1491                 : 
    1492               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1493               0 :         (__msg)->Log("[PPluginInstanceChild] Sending ", stderr);
    1494                 :     }
    1495               0 :     if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Recv, PPluginInstance::Msg_PluginFocusChange__ID), (&(mState)))))) {
    1496               0 :         NS_WARNING("bad state transition!");
    1497                 :     }
    1498                 : 
    1499               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
    1500               0 :     if ((!(__sendok))) {
    1501               0 :         return false;
    1502                 :     }
    1503                 : 
    1504               0 :     if (mozilla::ipc::LoggingEnabled()) {
    1505               0 :         (static_cast<const PPluginInstance::Reply_PluginFocusChange*>((&(__reply))))->Log("[PPluginInstanceChild] Received reply ", stderr);
    1506                 :     }
    1507                 : 
    1508               0 :     return true;
    1509                 : }
    1510                 : 
    1511                 : int32
    1512               0 : PPluginInstanceChild::Register(ChannelListener* aRouted)
    1513                 : {
    1514               0 :     return (mManager)->Register(aRouted);
    1515                 : }
    1516                 : 
    1517                 : int32
    1518               0 : PPluginInstanceChild::RegisterID(
    1519                 :         ChannelListener* aRouted,
    1520                 :         int32 aId)
    1521                 : {
    1522               0 :     return (mManager)->RegisterID(aRouted, aId);
    1523                 : }
    1524                 : 
    1525                 : ChannelListener*
    1526               0 : PPluginInstanceChild::Lookup(int32 aId)
    1527                 : {
    1528               0 :     return (mManager)->Lookup(aId);
    1529                 : }
    1530                 : 
    1531                 : void
    1532               0 : PPluginInstanceChild::Unregister(int32 aId)
    1533                 : {
    1534               0 :     return (mManager)->Unregister(aId);
    1535                 : }
    1536                 : 
    1537                 : void
    1538               0 : PPluginInstanceChild::RemoveManagee(
    1539                 :         int32 aProtocolId,
    1540                 :         ChannelListener* aListener)
    1541                 : {
    1542               0 :     switch (aProtocolId) {
    1543                 :     case PPluginBackgroundDestroyerMsgStart:
    1544                 :         {
    1545               0 :             PPluginBackgroundDestroyerChild* actor = static_cast<PPluginBackgroundDestroyerChild*>(aListener);
    1546               0 :             NS_ABORT_IF_FALSE(((mManagedPPluginBackgroundDestroyerChild).NoIndex) != ((mManagedPPluginBackgroundDestroyerChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1547                 : 
    1548               0 :             (mManagedPPluginBackgroundDestroyerChild).RemoveElementSorted(actor);
    1549               0 :             DeallocPPluginBackgroundDestroyer(actor);
    1550               0 :             return;
    1551                 :         }
    1552                 :     case PPluginScriptableObjectMsgStart:
    1553                 :         {
    1554               0 :             PPluginScriptableObjectChild* actor = static_cast<PPluginScriptableObjectChild*>(aListener);
    1555               0 :             NS_ABORT_IF_FALSE(((mManagedPPluginScriptableObjectChild).NoIndex) != ((mManagedPPluginScriptableObjectChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1556                 : 
    1557               0 :             (mManagedPPluginScriptableObjectChild).RemoveElementSorted(actor);
    1558               0 :             DeallocPPluginScriptableObject(actor);
    1559               0 :             return;
    1560                 :         }
    1561                 :     case PBrowserStreamMsgStart:
    1562                 :         {
    1563               0 :             PBrowserStreamChild* actor = static_cast<PBrowserStreamChild*>(aListener);
    1564               0 :             NS_ABORT_IF_FALSE(((mManagedPBrowserStreamChild).NoIndex) != ((mManagedPBrowserStreamChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1565                 : 
    1566               0 :             (mManagedPBrowserStreamChild).RemoveElementSorted(actor);
    1567               0 :             DeallocPBrowserStream(actor);
    1568               0 :             return;
    1569                 :         }
    1570                 :     case PPluginStreamMsgStart:
    1571                 :         {
    1572               0 :             PPluginStreamChild* actor = static_cast<PPluginStreamChild*>(aListener);
    1573               0 :             NS_ABORT_IF_FALSE(((mManagedPPluginStreamChild).NoIndex) != ((mManagedPPluginStreamChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1574                 : 
    1575               0 :             (mManagedPPluginStreamChild).RemoveElementSorted(actor);
    1576               0 :             DeallocPPluginStream(actor);
    1577               0 :             return;
    1578                 :         }
    1579                 :     case PStreamNotifyMsgStart:
    1580                 :         {
    1581               0 :             PStreamNotifyChild* actor = static_cast<PStreamNotifyChild*>(aListener);
    1582               0 :             NS_ABORT_IF_FALSE(((mManagedPStreamNotifyChild).NoIndex) != ((mManagedPStreamNotifyChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1583                 : 
    1584               0 :             (mManagedPStreamNotifyChild).RemoveElementSorted(actor);
    1585               0 :             DeallocPStreamNotify(actor);
    1586               0 :             return;
    1587                 :         }
    1588                 :     case PPluginSurfaceMsgStart:
    1589                 :         {
    1590               0 :             PPluginSurfaceChild* actor = static_cast<PPluginSurfaceChild*>(aListener);
    1591               0 :             NS_ABORT_IF_FALSE(((mManagedPPluginSurfaceChild).NoIndex) != ((mManagedPPluginSurfaceChild).BinaryIndexOf(actor)), "actor not managed by this!");
    1592                 : 
    1593               0 :             (mManagedPPluginSurfaceChild).RemoveElementSorted(actor);
    1594               0 :             DeallocPPluginSurface(actor);
    1595               0 :             return;
    1596                 :         }
    1597                 :     default:
    1598                 :         {
    1599               0 :             NS_RUNTIMEABORT("unreached");
    1600               0 :             return;
    1601                 :         }
    1602                 :     }
    1603                 : }
    1604                 : 
    1605                 : Shmem::SharedMemory*
    1606               0 : PPluginInstanceChild::CreateSharedMemory(
    1607                 :         size_t aSize,
    1608                 :         Shmem::SharedMemory::SharedMemoryType type,
    1609                 :         bool unsafe,
    1610                 :         Shmem::id_t* aId)
    1611                 : {
    1612               0 :     return (mManager)->CreateSharedMemory(aSize, type, unsafe, aId);
    1613                 : }
    1614                 : 
    1615                 : bool
    1616               0 : PPluginInstanceChild::AdoptSharedMemory(
    1617                 :         Shmem::SharedMemory* segment,
    1618                 :         Shmem::id_t* aId)
    1619                 : {
    1620               0 :     return (mManager)->AdoptSharedMemory(segment, aId);
    1621                 : }
    1622                 : 
    1623                 : Shmem::SharedMemory*
    1624               0 : PPluginInstanceChild::LookupSharedMemory(Shmem::id_t aId)
    1625                 : {
    1626               0 :     return (mManager)->LookupSharedMemory(aId);
    1627                 : }
    1628                 : 
    1629                 : bool
    1630               0 : PPluginInstanceChild::IsTrackingSharedMemory(Shmem::SharedMemory* segment)
    1631                 : {
    1632               0 :     return (mManager)->IsTrackingSharedMemory(segment);
    1633                 : }
    1634                 : 
    1635                 : bool
    1636               0 : PPluginInstanceChild::DestroySharedMemory(Shmem& aShmem)
    1637                 : {
    1638               0 :     return (mManager)->DestroySharedMemory(aShmem);
    1639                 : }
    1640                 : 
    1641                 : ProcessHandle
    1642               0 : PPluginInstanceChild::OtherProcess() const
    1643                 : {
    1644               0 :     return (mManager)->OtherProcess();
    1645                 : }
    1646                 : 
    1647                 : AsyncChannel*
    1648               0 : PPluginInstanceChild::GetIPCChannel()
    1649                 : {
    1650               0 :     return mChannel;
    1651                 : }
    1652                 : 
    1653                 : PPluginInstanceChild::Result
    1654               0 : PPluginInstanceChild::OnMessageReceived(const Message& __msg)
    1655                 : {
    1656               0 :     switch ((__msg).type()) {
    1657                 :     case PPluginInstance::Msg_WindowPosChanged__ID:
    1658                 :         {
    1659               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_WindowPosChanged");
    1660               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1661               0 :                 (static_cast<const PPluginInstance::Msg_WindowPosChanged*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1662                 :             }
    1663                 : 
    1664               0 :             void* __iter = 0;
    1665                 :             NPRemoteEvent event;
    1666                 : 
    1667               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    1668               0 :                 FatalError("error deserializing (better message TODO)");
    1669               0 :                 return MsgValueError;
    1670                 :             }
    1671               0 :             (__msg).EndRead(__iter);
    1672               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_WindowPosChanged__ID), (&(mState)))))) {
    1673               0 :                 NS_WARNING("bad state transition!");
    1674                 :             }
    1675               0 :             if ((!(RecvWindowPosChanged(event)))) {
    1676               0 :                 return MsgProcessingError;
    1677                 :             }
    1678                 : 
    1679               0 :             return MsgProcessed;
    1680                 :         }
    1681                 :     case PPluginInstance::Msg_AsyncSetWindow__ID:
    1682                 :         {
    1683               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_AsyncSetWindow");
    1684               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1685               0 :                 (static_cast<const PPluginInstance::Msg_AsyncSetWindow*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1686                 :             }
    1687                 : 
    1688               0 :             void* __iter = 0;
    1689                 :             gfxSurfaceType surfaceType;
    1690               0 :             NPRemoteWindow window;
    1691                 : 
    1692               0 :             if ((!(Read((&(surfaceType)), (&(__msg)), (&(__iter)))))) {
    1693               0 :                 FatalError("error deserializing (better message TODO)");
    1694               0 :                 return MsgValueError;
    1695                 :             }
    1696               0 :             if ((!(Read((&(window)), (&(__msg)), (&(__iter)))))) {
    1697               0 :                 FatalError("error deserializing (better message TODO)");
    1698               0 :                 return MsgValueError;
    1699                 :             }
    1700               0 :             (__msg).EndRead(__iter);
    1701               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_AsyncSetWindow__ID), (&(mState)))))) {
    1702               0 :                 NS_WARNING("bad state transition!");
    1703                 :             }
    1704               0 :             if ((!(RecvAsyncSetWindow(surfaceType, window)))) {
    1705               0 :                 return MsgProcessingError;
    1706                 :             }
    1707                 : 
    1708               0 :             return MsgProcessed;
    1709                 :         }
    1710                 :     case PPluginInstance::Msg_UpdateBackground__ID:
    1711                 :         {
    1712               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_UpdateBackground");
    1713               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1714               0 :                 (static_cast<const PPluginInstance::Msg_UpdateBackground*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1715                 :             }
    1716                 : 
    1717               0 :             void* __iter = 0;
    1718               0 :             SurfaceDescriptor background;
    1719               0 :             nsIntRect rect;
    1720                 : 
    1721               0 :             if ((!(Read((&(background)), (&(__msg)), (&(__iter)))))) {
    1722               0 :                 FatalError("error deserializing (better message TODO)");
    1723               0 :                 return MsgValueError;
    1724                 :             }
    1725               0 :             if ((!(Read((&(rect)), (&(__msg)), (&(__iter)))))) {
    1726               0 :                 FatalError("error deserializing (better message TODO)");
    1727               0 :                 return MsgValueError;
    1728                 :             }
    1729               0 :             (__msg).EndRead(__iter);
    1730               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_UpdateBackground__ID), (&(mState)))))) {
    1731               0 :                 NS_WARNING("bad state transition!");
    1732                 :             }
    1733               0 :             if ((!(RecvUpdateBackground(background, rect)))) {
    1734               0 :                 return MsgProcessingError;
    1735                 :             }
    1736                 : 
    1737               0 :             return MsgProcessed;
    1738                 :         }
    1739                 :     case PPluginInstance::Msg_NPP_DidComposite__ID:
    1740                 :         {
    1741               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_DidComposite");
    1742               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1743               0 :                 (static_cast<const PPluginInstance::Msg_NPP_DidComposite*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1744                 :             }
    1745                 : 
    1746               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_DidComposite__ID), (&(mState)))))) {
    1747               0 :                 NS_WARNING("bad state transition!");
    1748                 :             }
    1749               0 :             if ((!(RecvNPP_DidComposite()))) {
    1750               0 :                 return MsgProcessingError;
    1751                 :             }
    1752                 : 
    1753               0 :             return MsgProcessed;
    1754                 :         }
    1755                 :     case PPluginInstance::Reply_PPluginSurfaceConstructor__ID:
    1756                 :         {
    1757               0 :             return MsgProcessed;
    1758                 :         }
    1759                 :     case PPluginInstance::Reply_PPluginScriptableObjectConstructor__ID:
    1760                 :         {
    1761               0 :             return MsgProcessed;
    1762                 :         }
    1763                 :     case PPluginInstance::Msg_PPluginScriptableObjectConstructor__ID:
    1764                 :         {
    1765               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_PPluginScriptableObjectConstructor");
    1766               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1767               0 :                 (static_cast<const PPluginInstance::Msg_PPluginScriptableObjectConstructor*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1768                 :             }
    1769                 : 
    1770               0 :             void* __iter = 0;
    1771                 :             ActorHandle __handle;
    1772                 :             PPluginScriptableObjectChild* actor;
    1773                 : 
    1774               0 :             if ((!(Read((&(__handle)), (&(__msg)), (&(__iter)))))) {
    1775               0 :                 FatalError("error deserializing (better message TODO)");
    1776               0 :                 return MsgValueError;
    1777                 :             }
    1778               0 :             (__msg).EndRead(__iter);
    1779               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_PPluginScriptableObjectConstructor__ID), (&(mState)))))) {
    1780               0 :                 NS_WARNING("bad state transition!");
    1781                 :             }
    1782               0 :             actor = AllocPPluginScriptableObject();
    1783               0 :             if ((!(actor))) {
    1784               0 :                 return MsgValueError;
    1785                 :             }
    1786               0 :             (actor)->mId = RegisterID(actor, (__handle).mId);
    1787               0 :             (actor)->mManager = this;
    1788               0 :             (actor)->mChannel = mChannel;
    1789               0 :             (mManagedPPluginScriptableObjectChild).InsertElementSorted(actor);
    1790               0 :             (actor)->mState = mozilla::plugins::PPluginScriptableObject::__Start;
    1791                 : 
    1792               0 :             if ((!(RecvPPluginScriptableObjectConstructor(actor)))) {
    1793               0 :                 return MsgProcessingError;
    1794                 :             }
    1795                 : 
    1796               0 :             return MsgProcessed;
    1797                 :         }
    1798                 :     case PPluginInstance::Msg_PPluginBackgroundDestroyerConstructor__ID:
    1799                 :         {
    1800               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_PPluginBackgroundDestroyerConstructor");
    1801               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1802               0 :                 (static_cast<const PPluginInstance::Msg_PPluginBackgroundDestroyerConstructor*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1803                 :             }
    1804                 : 
    1805               0 :             void* __iter = 0;
    1806                 :             ActorHandle __handle;
    1807                 :             PPluginBackgroundDestroyerChild* actor;
    1808                 : 
    1809               0 :             if ((!(Read((&(__handle)), (&(__msg)), (&(__iter)))))) {
    1810               0 :                 FatalError("error deserializing (better message TODO)");
    1811               0 :                 return MsgValueError;
    1812                 :             }
    1813               0 :             (__msg).EndRead(__iter);
    1814               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_PPluginBackgroundDestroyerConstructor__ID), (&(mState)))))) {
    1815               0 :                 NS_WARNING("bad state transition!");
    1816                 :             }
    1817               0 :             actor = AllocPPluginBackgroundDestroyer();
    1818               0 :             if ((!(actor))) {
    1819               0 :                 return MsgValueError;
    1820                 :             }
    1821               0 :             (actor)->mId = RegisterID(actor, (__handle).mId);
    1822               0 :             (actor)->mManager = this;
    1823               0 :             (actor)->mChannel = mChannel;
    1824               0 :             (mManagedPPluginBackgroundDestroyerChild).InsertElementSorted(actor);
    1825               0 :             (actor)->mState = mozilla::plugins::PPluginBackgroundDestroyer::__Start;
    1826                 : 
    1827               0 :             if ((!(RecvPPluginBackgroundDestroyerConstructor(actor)))) {
    1828               0 :                 return MsgProcessingError;
    1829                 :             }
    1830                 : 
    1831               0 :             return MsgProcessed;
    1832                 :         }
    1833                 :     default:
    1834                 :         {
    1835               0 :             return MsgNotKnown;
    1836                 :         }
    1837                 :     }
    1838                 : }
    1839                 : 
    1840                 : PPluginInstanceChild::Result
    1841               0 : PPluginInstanceChild::OnMessageReceived(
    1842                 :         const Message& __msg,
    1843                 :         Message*& __reply)
    1844                 : {
    1845               0 :     return MsgNotKnown;
    1846                 : }
    1847                 : 
    1848                 : PPluginInstanceChild::Result
    1849               0 : PPluginInstanceChild::OnCallReceived(
    1850                 :         const Message& __msg,
    1851                 :         Message*& __reply)
    1852                 : {
    1853               0 :     switch ((__msg).type()) {
    1854                 :     case PPluginInstance::Msg___delete____ID:
    1855                 :         {
    1856               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg___delete__");
    1857               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1858               0 :                 (static_cast<const PPluginInstance::Msg___delete__*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1859                 :             }
    1860                 : 
    1861               0 :             void* __iter = 0;
    1862                 :             PPluginInstanceChild* actor;
    1863                 : 
    1864               0 :             if ((!(Read((&(actor)), (&(__msg)), (&(__iter)), false)))) {
    1865               0 :                 FatalError("error deserializing (better message TODO)");
    1866               0 :                 return MsgValueError;
    1867                 :             }
    1868               0 :             (__msg).EndRead(__iter);
    1869               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg___delete____ID), (&(mState)))))) {
    1870               0 :                 NS_WARNING("bad state transition!");
    1871                 :             }
    1872               0 :             if ((!(Answer__delete__()))) {
    1873               0 :                 return MsgProcessingError;
    1874                 :             }
    1875                 : 
    1876               0 :             int32 __id = mId;
    1877               0 :             (actor)->DestroySubtree(Deletion);
    1878               0 :             (actor)->DeallocSubtree();
    1879               0 :             ((actor)->mManager)->RemoveManagee(PPluginInstanceMsgStart, actor);
    1880                 : 
    1881               0 :             __reply = new PPluginInstance::Reply___delete__();
    1882                 : 
    1883               0 :             (__reply)->set_routing_id(__id);
    1884               0 :             (__reply)->set_rpc();
    1885               0 :             (__reply)->set_reply();
    1886                 : 
    1887               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1888               0 :                 (static_cast<const PPluginInstance::Reply___delete__*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    1889                 :             }
    1890                 : 
    1891               0 :             return MsgProcessed;
    1892                 :         }
    1893                 :     case PPluginInstance::Msg_NPP_SetWindow__ID:
    1894                 :         {
    1895               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_SetWindow");
    1896               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1897               0 :                 (static_cast<const PPluginInstance::Msg_NPP_SetWindow*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1898                 :             }
    1899                 : 
    1900               0 :             void* __iter = 0;
    1901               0 :             NPRemoteWindow window;
    1902                 : 
    1903               0 :             if ((!(Read((&(window)), (&(__msg)), (&(__iter)))))) {
    1904               0 :                 FatalError("error deserializing (better message TODO)");
    1905               0 :                 return MsgValueError;
    1906                 :             }
    1907               0 :             (__msg).EndRead(__iter);
    1908               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_SetWindow__ID), (&(mState)))))) {
    1909               0 :                 NS_WARNING("bad state transition!");
    1910                 :             }
    1911               0 :             int32 __id = mId;
    1912               0 :             if ((!(AnswerNPP_SetWindow(window)))) {
    1913               0 :                 return MsgProcessingError;
    1914                 :             }
    1915                 : 
    1916               0 :             __reply = new PPluginInstance::Reply_NPP_SetWindow();
    1917                 : 
    1918               0 :             (__reply)->set_routing_id(__id);
    1919               0 :             (__reply)->set_rpc();
    1920               0 :             (__reply)->set_reply();
    1921                 : 
    1922               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1923               0 :                 (static_cast<const PPluginInstance::Reply_NPP_SetWindow*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    1924                 :             }
    1925               0 :             return MsgProcessed;
    1926                 :         }
    1927                 :     case PPluginInstance::Msg_NPP_GetValue_NPPVpluginWantsAllNetworkStreams__ID:
    1928                 :         {
    1929               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_GetValue_NPPVpluginWantsAllNetworkStreams");
    1930               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1931               0 :                 (static_cast<const PPluginInstance::Msg_NPP_GetValue_NPPVpluginWantsAllNetworkStreams*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1932                 :             }
    1933                 : 
    1934               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_GetValue_NPPVpluginWantsAllNetworkStreams__ID), (&(mState)))))) {
    1935               0 :                 NS_WARNING("bad state transition!");
    1936                 :             }
    1937                 :             bool value;
    1938                 :             NPError result;
    1939               0 :             int32 __id = mId;
    1940               0 :             if ((!(AnswerNPP_GetValue_NPPVpluginWantsAllNetworkStreams((&(value)), (&(result)))))) {
    1941               0 :                 return MsgProcessingError;
    1942                 :             }
    1943                 : 
    1944               0 :             __reply = new PPluginInstance::Reply_NPP_GetValue_NPPVpluginWantsAllNetworkStreams();
    1945                 : 
    1946               0 :             Write(value, __reply);
    1947               0 :             Write(result, __reply);
    1948               0 :             (__reply)->set_routing_id(__id);
    1949               0 :             (__reply)->set_rpc();
    1950               0 :             (__reply)->set_reply();
    1951                 : 
    1952               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1953               0 :                 (static_cast<const PPluginInstance::Reply_NPP_GetValue_NPPVpluginWantsAllNetworkStreams*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    1954                 :             }
    1955               0 :             return MsgProcessed;
    1956                 :         }
    1957                 :     case PPluginInstance::Msg_NPP_GetValue_NPPVpluginNeedsXEmbed__ID:
    1958                 :         {
    1959               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_GetValue_NPPVpluginNeedsXEmbed");
    1960               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1961               0 :                 (static_cast<const PPluginInstance::Msg_NPP_GetValue_NPPVpluginNeedsXEmbed*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1962                 :             }
    1963                 : 
    1964               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_GetValue_NPPVpluginNeedsXEmbed__ID), (&(mState)))))) {
    1965               0 :                 NS_WARNING("bad state transition!");
    1966                 :             }
    1967                 :             bool value;
    1968                 :             NPError result;
    1969               0 :             int32 __id = mId;
    1970               0 :             if ((!(AnswerNPP_GetValue_NPPVpluginNeedsXEmbed((&(value)), (&(result)))))) {
    1971               0 :                 return MsgProcessingError;
    1972                 :             }
    1973                 : 
    1974               0 :             __reply = new PPluginInstance::Reply_NPP_GetValue_NPPVpluginNeedsXEmbed();
    1975                 : 
    1976               0 :             Write(value, __reply);
    1977               0 :             Write(result, __reply);
    1978               0 :             (__reply)->set_routing_id(__id);
    1979               0 :             (__reply)->set_rpc();
    1980               0 :             (__reply)->set_reply();
    1981                 : 
    1982               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1983               0 :                 (static_cast<const PPluginInstance::Reply_NPP_GetValue_NPPVpluginNeedsXEmbed*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    1984                 :             }
    1985               0 :             return MsgProcessed;
    1986                 :         }
    1987                 :     case PPluginInstance::Msg_NPP_GetValue_NPPVpluginScriptableNPObject__ID:
    1988                 :         {
    1989               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_GetValue_NPPVpluginScriptableNPObject");
    1990               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1991               0 :                 (static_cast<const PPluginInstance::Msg_NPP_GetValue_NPPVpluginScriptableNPObject*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    1992                 :             }
    1993                 : 
    1994               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_GetValue_NPPVpluginScriptableNPObject__ID), (&(mState)))))) {
    1995               0 :                 NS_WARNING("bad state transition!");
    1996                 :             }
    1997                 :             PPluginScriptableObjectChild* value;
    1998                 :             NPError result;
    1999               0 :             int32 __id = mId;
    2000               0 :             if ((!(AnswerNPP_GetValue_NPPVpluginScriptableNPObject((&(value)), (&(result)))))) {
    2001               0 :                 return MsgProcessingError;
    2002                 :             }
    2003                 : 
    2004               0 :             __reply = new PPluginInstance::Reply_NPP_GetValue_NPPVpluginScriptableNPObject();
    2005                 : 
    2006               0 :             Write(value, __reply, true);
    2007               0 :             Write(result, __reply);
    2008               0 :             (__reply)->set_routing_id(__id);
    2009               0 :             (__reply)->set_rpc();
    2010               0 :             (__reply)->set_reply();
    2011                 : 
    2012               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2013               0 :                 (static_cast<const PPluginInstance::Reply_NPP_GetValue_NPPVpluginScriptableNPObject*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2014                 :             }
    2015               0 :             return MsgProcessed;
    2016                 :         }
    2017                 :     case PPluginInstance::Msg_NPP_SetValue_NPNVprivateModeBool__ID:
    2018                 :         {
    2019               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_SetValue_NPNVprivateModeBool");
    2020               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2021               0 :                 (static_cast<const PPluginInstance::Msg_NPP_SetValue_NPNVprivateModeBool*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2022                 :             }
    2023                 : 
    2024               0 :             void* __iter = 0;
    2025                 :             bool value;
    2026                 : 
    2027               0 :             if ((!(Read((&(value)), (&(__msg)), (&(__iter)))))) {
    2028               0 :                 FatalError("error deserializing (better message TODO)");
    2029               0 :                 return MsgValueError;
    2030                 :             }
    2031               0 :             (__msg).EndRead(__iter);
    2032               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_SetValue_NPNVprivateModeBool__ID), (&(mState)))))) {
    2033               0 :                 NS_WARNING("bad state transition!");
    2034                 :             }
    2035                 :             NPError result;
    2036               0 :             int32 __id = mId;
    2037               0 :             if ((!(AnswerNPP_SetValue_NPNVprivateModeBool(value, (&(result)))))) {
    2038               0 :                 return MsgProcessingError;
    2039                 :             }
    2040                 : 
    2041               0 :             __reply = new PPluginInstance::Reply_NPP_SetValue_NPNVprivateModeBool();
    2042                 : 
    2043               0 :             Write(result, __reply);
    2044               0 :             (__reply)->set_routing_id(__id);
    2045               0 :             (__reply)->set_rpc();
    2046               0 :             (__reply)->set_reply();
    2047                 : 
    2048               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2049               0 :                 (static_cast<const PPluginInstance::Reply_NPP_SetValue_NPNVprivateModeBool*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2050                 :             }
    2051               0 :             return MsgProcessed;
    2052                 :         }
    2053                 :     case PPluginInstance::Msg_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId__ID:
    2054                 :         {
    2055               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId");
    2056               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2057               0 :                 (static_cast<const PPluginInstance::Msg_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2058                 :             }
    2059                 : 
    2060               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId__ID), (&(mState)))))) {
    2061               0 :                 NS_WARNING("bad state transition!");
    2062                 :             }
    2063               0 :             nsCString plug_id;
    2064                 :             NPError result;
    2065               0 :             int32 __id = mId;
    2066               0 :             if ((!(AnswerNPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId((&(plug_id)), (&(result)))))) {
    2067               0 :                 return MsgProcessingError;
    2068                 :             }
    2069                 : 
    2070               0 :             __reply = new PPluginInstance::Reply_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId();
    2071                 : 
    2072               0 :             Write(plug_id, __reply);
    2073               0 :             Write(result, __reply);
    2074               0 :             (__reply)->set_routing_id(__id);
    2075               0 :             (__reply)->set_rpc();
    2076               0 :             (__reply)->set_reply();
    2077                 : 
    2078               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2079               0 :                 (static_cast<const PPluginInstance::Reply_NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2080                 :             }
    2081               0 :             return MsgProcessed;
    2082                 :         }
    2083                 :     case PPluginInstance::Msg_NPP_HandleEvent__ID:
    2084                 :         {
    2085               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_HandleEvent");
    2086               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2087               0 :                 (static_cast<const PPluginInstance::Msg_NPP_HandleEvent*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2088                 :             }
    2089                 : 
    2090               0 :             void* __iter = 0;
    2091                 :             NPRemoteEvent event;
    2092                 : 
    2093               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2094               0 :                 FatalError("error deserializing (better message TODO)");
    2095               0 :                 return MsgValueError;
    2096                 :             }
    2097               0 :             (__msg).EndRead(__iter);
    2098               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_HandleEvent__ID), (&(mState)))))) {
    2099               0 :                 NS_WARNING("bad state transition!");
    2100                 :             }
    2101                 :             int16_t handled;
    2102               0 :             int32 __id = mId;
    2103               0 :             if ((!(AnswerNPP_HandleEvent(event, (&(handled)))))) {
    2104               0 :                 return MsgProcessingError;
    2105                 :             }
    2106                 : 
    2107               0 :             __reply = new PPluginInstance::Reply_NPP_HandleEvent();
    2108                 : 
    2109               0 :             Write(handled, __reply);
    2110               0 :             (__reply)->set_routing_id(__id);
    2111               0 :             (__reply)->set_rpc();
    2112               0 :             (__reply)->set_reply();
    2113                 : 
    2114               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2115               0 :                 (static_cast<const PPluginInstance::Reply_NPP_HandleEvent*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2116                 :             }
    2117               0 :             return MsgProcessed;
    2118                 :         }
    2119                 :     case PPluginInstance::Msg_NPP_HandleEvent_Shmem__ID:
    2120                 :         {
    2121               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_HandleEvent_Shmem");
    2122               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2123               0 :                 (static_cast<const PPluginInstance::Msg_NPP_HandleEvent_Shmem*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2124                 :             }
    2125                 : 
    2126               0 :             void* __iter = 0;
    2127                 :             NPRemoteEvent event;
    2128               0 :             Shmem buffer;
    2129                 : 
    2130               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2131               0 :                 FatalError("error deserializing (better message TODO)");
    2132               0 :                 return MsgValueError;
    2133                 :             }
    2134               0 :             if ((!(Read((&(buffer)), (&(__msg)), (&(__iter)))))) {
    2135               0 :                 FatalError("error deserializing (better message TODO)");
    2136               0 :                 return MsgValueError;
    2137                 :             }
    2138               0 :             (__msg).EndRead(__iter);
    2139               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_HandleEvent_Shmem__ID), (&(mState)))))) {
    2140               0 :                 NS_WARNING("bad state transition!");
    2141                 :             }
    2142                 :             int16_t handled;
    2143               0 :             Shmem rtnbuffer;
    2144               0 :             int32 __id = mId;
    2145               0 :             if ((!(AnswerNPP_HandleEvent_Shmem(event, buffer, (&(handled)), (&(rtnbuffer)))))) {
    2146               0 :                 return MsgProcessingError;
    2147                 :             }
    2148                 : 
    2149               0 :             __reply = new PPluginInstance::Reply_NPP_HandleEvent_Shmem();
    2150                 : 
    2151               0 :             Write(handled, __reply);
    2152               0 :             Write(rtnbuffer, __reply);
    2153               0 :             (__reply)->set_routing_id(__id);
    2154               0 :             (__reply)->set_rpc();
    2155               0 :             (__reply)->set_reply();
    2156                 : 
    2157               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2158               0 :                 (static_cast<const PPluginInstance::Reply_NPP_HandleEvent_Shmem*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2159                 :             }
    2160               0 :             return MsgProcessed;
    2161                 :         }
    2162                 :     case PPluginInstance::Msg_NPP_HandleEvent_IOSurface__ID:
    2163                 :         {
    2164               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_HandleEvent_IOSurface");
    2165               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2166               0 :                 (static_cast<const PPluginInstance::Msg_NPP_HandleEvent_IOSurface*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2167                 :             }
    2168                 : 
    2169               0 :             void* __iter = 0;
    2170                 :             NPRemoteEvent event;
    2171                 :             uint32_t surfaceid;
    2172                 : 
    2173               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2174               0 :                 FatalError("error deserializing (better message TODO)");
    2175               0 :                 return MsgValueError;
    2176                 :             }
    2177               0 :             if ((!(Read((&(surfaceid)), (&(__msg)), (&(__iter)))))) {
    2178               0 :                 FatalError("error deserializing (better message TODO)");
    2179               0 :                 return MsgValueError;
    2180                 :             }
    2181               0 :             (__msg).EndRead(__iter);
    2182               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_HandleEvent_IOSurface__ID), (&(mState)))))) {
    2183               0 :                 NS_WARNING("bad state transition!");
    2184                 :             }
    2185                 :             int16_t handled;
    2186               0 :             int32 __id = mId;
    2187               0 :             if ((!(AnswerNPP_HandleEvent_IOSurface(event, surfaceid, (&(handled)))))) {
    2188               0 :                 return MsgProcessingError;
    2189                 :             }
    2190                 : 
    2191               0 :             __reply = new PPluginInstance::Reply_NPP_HandleEvent_IOSurface();
    2192                 : 
    2193               0 :             Write(handled, __reply);
    2194               0 :             (__reply)->set_routing_id(__id);
    2195               0 :             (__reply)->set_rpc();
    2196               0 :             (__reply)->set_reply();
    2197                 : 
    2198               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2199               0 :                 (static_cast<const PPluginInstance::Reply_NPP_HandleEvent_IOSurface*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2200                 :             }
    2201               0 :             return MsgProcessed;
    2202                 :         }
    2203                 :     case PPluginInstance::Msg_Paint__ID:
    2204                 :         {
    2205               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_Paint");
    2206               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2207               0 :                 (static_cast<const PPluginInstance::Msg_Paint*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2208                 :             }
    2209                 : 
    2210               0 :             void* __iter = 0;
    2211                 :             NPRemoteEvent event;
    2212                 : 
    2213               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2214               0 :                 FatalError("error deserializing (better message TODO)");
    2215               0 :                 return MsgValueError;
    2216                 :             }
    2217               0 :             (__msg).EndRead(__iter);
    2218               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_Paint__ID), (&(mState)))))) {
    2219               0 :                 NS_WARNING("bad state transition!");
    2220                 :             }
    2221                 :             int16_t handled;
    2222               0 :             int32 __id = mId;
    2223               0 :             if ((!(AnswerPaint(event, (&(handled)))))) {
    2224               0 :                 return MsgProcessingError;
    2225                 :             }
    2226                 : 
    2227               0 :             __reply = new PPluginInstance::Reply_Paint();
    2228                 : 
    2229               0 :             Write(handled, __reply);
    2230               0 :             (__reply)->set_routing_id(__id);
    2231               0 :             (__reply)->set_rpc();
    2232               0 :             (__reply)->set_reply();
    2233                 : 
    2234               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2235               0 :                 (static_cast<const PPluginInstance::Reply_Paint*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2236                 :             }
    2237               0 :             return MsgProcessed;
    2238                 :         }
    2239                 :     case PPluginInstance::Msg_HandleTextEvent__ID:
    2240                 :         {
    2241               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_HandleTextEvent");
    2242               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2243               0 :                 (static_cast<const PPluginInstance::Msg_HandleTextEvent*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2244                 :             }
    2245                 : 
    2246               0 :             void* __iter = 0;
    2247               0 :             nsTextEvent event;
    2248                 : 
    2249               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2250               0 :                 FatalError("error deserializing (better message TODO)");
    2251               0 :                 return MsgValueError;
    2252                 :             }
    2253               0 :             (__msg).EndRead(__iter);
    2254               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_HandleTextEvent__ID), (&(mState)))))) {
    2255               0 :                 NS_WARNING("bad state transition!");
    2256                 :             }
    2257                 :             bool handled;
    2258               0 :             int32 __id = mId;
    2259               0 :             if ((!(AnswerHandleTextEvent(event, (&(handled)))))) {
    2260               0 :                 return MsgProcessingError;
    2261                 :             }
    2262                 : 
    2263               0 :             __reply = new PPluginInstance::Reply_HandleTextEvent();
    2264                 : 
    2265               0 :             Write(handled, __reply);
    2266               0 :             (__reply)->set_routing_id(__id);
    2267               0 :             (__reply)->set_rpc();
    2268               0 :             (__reply)->set_reply();
    2269                 : 
    2270               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2271               0 :                 (static_cast<const PPluginInstance::Reply_HandleTextEvent*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2272                 :             }
    2273               0 :             return MsgProcessed;
    2274                 :         }
    2275                 :     case PPluginInstance::Msg_HandleKeyEvent__ID:
    2276                 :         {
    2277               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_HandleKeyEvent");
    2278               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2279               0 :                 (static_cast<const PPluginInstance::Msg_HandleKeyEvent*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2280                 :             }
    2281                 : 
    2282               0 :             void* __iter = 0;
    2283               0 :             nsKeyEvent event;
    2284                 : 
    2285               0 :             if ((!(Read((&(event)), (&(__msg)), (&(__iter)))))) {
    2286               0 :                 FatalError("error deserializing (better message TODO)");
    2287               0 :                 return MsgValueError;
    2288                 :             }
    2289               0 :             (__msg).EndRead(__iter);
    2290               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_HandleKeyEvent__ID), (&(mState)))))) {
    2291               0 :                 NS_WARNING("bad state transition!");
    2292                 :             }
    2293                 :             bool handled;
    2294               0 :             int32 __id = mId;
    2295               0 :             if ((!(AnswerHandleKeyEvent(event, (&(handled)))))) {
    2296               0 :                 return MsgProcessingError;
    2297                 :             }
    2298                 : 
    2299               0 :             __reply = new PPluginInstance::Reply_HandleKeyEvent();
    2300                 : 
    2301               0 :             Write(handled, __reply);
    2302               0 :             (__reply)->set_routing_id(__id);
    2303               0 :             (__reply)->set_rpc();
    2304               0 :             (__reply)->set_reply();
    2305                 : 
    2306               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2307               0 :                 (static_cast<const PPluginInstance::Reply_HandleKeyEvent*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2308                 :             }
    2309               0 :             return MsgProcessed;
    2310                 :         }
    2311                 :     case PPluginInstance::Msg_NPP_Destroy__ID:
    2312                 :         {
    2313               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_NPP_Destroy");
    2314               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2315               0 :                 (static_cast<const PPluginInstance::Msg_NPP_Destroy*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2316                 :             }
    2317                 : 
    2318               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_NPP_Destroy__ID), (&(mState)))))) {
    2319               0 :                 NS_WARNING("bad state transition!");
    2320                 :             }
    2321                 :             NPError rv;
    2322               0 :             int32 __id = mId;
    2323               0 :             if ((!(AnswerNPP_Destroy((&(rv)))))) {
    2324               0 :                 return MsgProcessingError;
    2325                 :             }
    2326                 : 
    2327               0 :             __reply = new PPluginInstance::Reply_NPP_Destroy();
    2328                 : 
    2329               0 :             Write(rv, __reply);
    2330               0 :             (__reply)->set_routing_id(__id);
    2331               0 :             (__reply)->set_rpc();
    2332               0 :             (__reply)->set_reply();
    2333                 : 
    2334               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2335               0 :                 (static_cast<const PPluginInstance::Reply_NPP_Destroy*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2336                 :             }
    2337               0 :             return MsgProcessed;
    2338                 :         }
    2339                 :     case PPluginInstance::Msg_PBrowserStreamConstructor__ID:
    2340                 :         {
    2341               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_PBrowserStreamConstructor");
    2342               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2343               0 :                 (static_cast<const PPluginInstance::Msg_PBrowserStreamConstructor*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2344                 :             }
    2345                 : 
    2346               0 :             void* __iter = 0;
    2347                 :             ActorHandle __handle;
    2348                 :             PBrowserStreamChild* actor;
    2349               0 :             nsCString url;
    2350                 :             uint32_t length;
    2351                 :             uint32_t lastmodified;
    2352                 :             PStreamNotifyChild* notifyData;
    2353               0 :             nsCString headers;
    2354               0 :             nsCString mimeType;
    2355                 :             bool seekable;
    2356                 : 
    2357               0 :             if ((!(Read((&(__handle)), (&(__msg)), (&(__iter)))))) {
    2358               0 :                 FatalError("error deserializing (better message TODO)");
    2359               0 :                 return MsgValueError;
    2360                 :             }
    2361               0 :             if ((!(Read((&(url)), (&(__msg)), (&(__iter)))))) {
    2362               0 :                 FatalError("error deserializing (better message TODO)");
    2363               0 :                 return MsgValueError;
    2364                 :             }
    2365               0 :             if ((!(Read((&(length)), (&(__msg)), (&(__iter)))))) {
    2366               0 :                 FatalError("error deserializing (better message TODO)");
    2367               0 :                 return MsgValueError;
    2368                 :             }
    2369               0 :             if ((!(Read((&(lastmodified)), (&(__msg)), (&(__iter)))))) {
    2370               0 :                 FatalError("error deserializing (better message TODO)");
    2371               0 :                 return MsgValueError;
    2372                 :             }
    2373               0 :             if ((!(Read((&(notifyData)), (&(__msg)), (&(__iter)), true)))) {
    2374               0 :                 FatalError("error deserializing (better message TODO)");
    2375               0 :                 return MsgValueError;
    2376                 :             }
    2377               0 :             if ((!(Read((&(headers)), (&(__msg)), (&(__iter)))))) {
    2378               0 :                 FatalError("error deserializing (better message TODO)");
    2379               0 :                 return MsgValueError;
    2380                 :             }
    2381               0 :             if ((!(Read((&(mimeType)), (&(__msg)), (&(__iter)))))) {
    2382               0 :                 FatalError("error deserializing (better message TODO)");
    2383               0 :                 return MsgValueError;
    2384                 :             }
    2385               0 :             if ((!(Read((&(seekable)), (&(__msg)), (&(__iter)))))) {
    2386               0 :                 FatalError("error deserializing (better message TODO)");
    2387               0 :                 return MsgValueError;
    2388                 :             }
    2389               0 :             (__msg).EndRead(__iter);
    2390               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_PBrowserStreamConstructor__ID), (&(mState)))))) {
    2391               0 :                 NS_WARNING("bad state transition!");
    2392                 :             }
    2393                 :             NPError rv;
    2394                 :             uint16_t stype;
    2395               0 :             actor = AllocPBrowserStream(url, length, lastmodified, notifyData, headers, mimeType, seekable, (&(rv)), (&(stype)));
    2396               0 :             if ((!(actor))) {
    2397               0 :                 return MsgValueError;
    2398                 :             }
    2399               0 :             (actor)->mId = RegisterID(actor, (__handle).mId);
    2400               0 :             (actor)->mManager = this;
    2401               0 :             (actor)->mChannel = mChannel;
    2402               0 :             (mManagedPBrowserStreamChild).InsertElementSorted(actor);
    2403               0 :             (actor)->mState = mozilla::plugins::PBrowserStream::__Start;
    2404                 : 
    2405               0 :             int32 __id = mId;
    2406               0 :             if ((!(AnswerPBrowserStreamConstructor(actor, url, length, lastmodified, notifyData, headers, mimeType, seekable, (&(rv)), (&(stype)))))) {
    2407               0 :                 return MsgProcessingError;
    2408                 :             }
    2409               0 :             __reply = new PPluginInstance::Reply_PBrowserStreamConstructor();
    2410                 : 
    2411               0 :             Write(rv, __reply);
    2412               0 :             Write(stype, __reply);
    2413               0 :             (__reply)->set_routing_id(__id);
    2414               0 :             (__reply)->set_rpc();
    2415               0 :             (__reply)->set_reply();
    2416                 : 
    2417               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2418               0 :                 (static_cast<const PPluginInstance::Reply_PBrowserStreamConstructor*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2419                 :             }
    2420                 : 
    2421               0 :             return MsgProcessed;
    2422                 :         }
    2423                 :     case PPluginInstance::Msg_SetPluginFocus__ID:
    2424                 :         {
    2425               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_SetPluginFocus");
    2426               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2427               0 :                 (static_cast<const PPluginInstance::Msg_SetPluginFocus*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2428                 :             }
    2429                 : 
    2430               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_SetPluginFocus__ID), (&(mState)))))) {
    2431               0 :                 NS_WARNING("bad state transition!");
    2432                 :             }
    2433               0 :             int32 __id = mId;
    2434               0 :             if ((!(AnswerSetPluginFocus()))) {
    2435               0 :                 return MsgProcessingError;
    2436                 :             }
    2437                 : 
    2438               0 :             __reply = new PPluginInstance::Reply_SetPluginFocus();
    2439                 : 
    2440               0 :             (__reply)->set_routing_id(__id);
    2441               0 :             (__reply)->set_rpc();
    2442               0 :             (__reply)->set_reply();
    2443                 : 
    2444               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2445               0 :                 (static_cast<const PPluginInstance::Reply_SetPluginFocus*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2446                 :             }
    2447               0 :             return MsgProcessed;
    2448                 :         }
    2449                 :     case PPluginInstance::Msg_UpdateWindow__ID:
    2450                 :         {
    2451               0 :             (const_cast<Message&>(__msg)).set_name("PPluginInstance::Msg_UpdateWindow");
    2452               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2453               0 :                 (static_cast<const PPluginInstance::Msg_UpdateWindow*>((&(__msg))))->Log("[PPluginInstanceChild] Received ", stderr);
    2454                 :             }
    2455                 : 
    2456               0 :             if ((!(PPluginInstance::Transition(mState, Trigger(Trigger::Send, PPluginInstance::Msg_UpdateWindow__ID), (&(mState)))))) {
    2457               0 :                 NS_WARNING("bad state transition!");
    2458                 :             }
    2459               0 :             int32 __id = mId;
    2460               0 :             if ((!(AnswerUpdateWindow()))) {
    2461               0 :                 return MsgProcessingError;
    2462                 :             }
    2463                 : 
    2464               0 :             __reply = new PPluginInstance::Reply_UpdateWindow();
    2465                 : 
    2466               0 :             (__reply)->set_routing_id(__id);
    2467               0 :             (__reply)->set_rpc();
    2468               0 :             (__reply)->set_reply();
    2469                 : 
    2470               0 :             if (mozilla::ipc::LoggingEnabled()) {
    2471               0 :                 (static_cast<const PPluginInstance::Reply_UpdateWindow*>(__reply))->Log("[PPluginInstanceChild] Sending reply ", stderr);
    2472                 :             }
    2473               0 :             return MsgProcessed;
    2474                 :         }
    2475                 :     default:
    2476                 :         {
    2477               0 :             return MsgNotKnown;
    2478                 :         }
    2479                 :     }
    2480                 : }
    2481                 : 
    2482                 : void
    2483               0 : PPluginInstanceChild::OnProcessingError(Result code)
    2484                 : {
    2485               0 :     NS_RUNTIMEABORT("`OnProcessingError' called on non-toplevel actor");
    2486               0 : }
    2487                 : 
    2488                 : bool
    2489               0 : PPluginInstanceChild::OnReplyTimeout()
    2490                 : {
    2491               0 :     NS_RUNTIMEABORT("`OnReplyTimeout' called on non-toplevel actor");
    2492               0 :     return false;
    2493                 : }
    2494                 : 
    2495                 : void
    2496               0 : PPluginInstanceChild::OnChannelClose()
    2497                 : {
    2498               0 :     NS_RUNTIMEABORT("`OnClose' called on non-toplevel actor");
    2499               0 : }
    2500                 : 
    2501                 : void
    2502               0 : PPluginInstanceChild::OnChannelError()
    2503                 : {
    2504               0 :     NS_RUNTIMEABORT("`OnError' called on non-toplevel actor");
    2505               0 : }
    2506                 : 
    2507                 : void
    2508               0 : PPluginInstanceChild::OnChannelConnected(int32 pid)
    2509                 : {
    2510               0 :     NS_RUNTIMEABORT("'OnConnected' called on non-toplevel actor");
    2511               0 : }
    2512                 : 
    2513                 : bool
    2514               0 : PPluginInstanceChild::AllocShmem(
    2515                 :         size_t aSize,
    2516                 :         Shmem::SharedMemory::SharedMemoryType aType,
    2517                 :         Shmem* aMem)
    2518                 : {
    2519                 :     Shmem::id_t aId;
    2520               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, false, (&(aId))));
    2521               0 :     if ((!(rawmem))) {
    2522               0 :         return false;
    2523                 :     }
    2524                 : 
    2525               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
    2526               0 :     return true;
    2527                 : }
    2528                 : 
    2529                 : bool
    2530               0 : PPluginInstanceChild::AllocUnsafeShmem(
    2531                 :         size_t aSize,
    2532                 :         Shmem::SharedMemory::SharedMemoryType aType,
    2533                 :         Shmem* aMem)
    2534                 : {
    2535                 :     Shmem::id_t aId;
    2536               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, true, (&(aId))));
    2537               0 :     if ((!(rawmem))) {
    2538               0 :         return false;
    2539                 :     }
    2540                 : 
    2541               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
    2542               0 :     return true;
    2543                 : }
    2544                 : 
    2545                 : bool
    2546               0 : PPluginInstanceChild::AdoptShmem(
    2547                 :         Shmem& aMem,
    2548                 :         Shmem* aOutMem)
    2549                 : {
    2550               0 :     Shmem::SharedMemory* rawmem = (aMem).Segment(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    2551               0 :     if (((!(rawmem))) || (IsTrackingSharedMemory(rawmem))) {
    2552               0 :         NS_RUNTIMEABORT("bad Shmem");
    2553                 :     }
    2554                 : 
    2555                 :     Shmem::id_t aId;
    2556               0 :     if ((!(AdoptSharedMemory(rawmem, (&(aId)))))) {
    2557               0 :         return false;
    2558                 :     }
    2559                 : 
    2560               0 :     (*(aOutMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, aId);
    2561               0 :     return true;
    2562                 : }
    2563                 : 
    2564                 : bool
    2565               0 : PPluginInstanceChild::DeallocShmem(Shmem& aMem)
    2566                 : {
    2567               0 :     bool ok = DestroySharedMemory(aMem);
    2568               0 :     (aMem).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    2569               0 :     return ok;
    2570                 : }
    2571                 : 
    2572                 : void
    2573               0 : PPluginInstanceChild::FatalError(const char* const msg) const
    2574                 : {
    2575                 :     // Virtual method to prevent inlining.
    2576                 :     // This give us better error reporting.
    2577                 :     // See bug 589371
    2578                 : 
    2579               0 :     NS_ERROR("IPDL error:");
    2580               0 :     NS_ERROR(msg);
    2581                 : 
    2582               0 :     NS_RUNTIMEABORT("[PPluginInstanceChild] abort()ing as a result");
    2583               0 : }
    2584                 : 
    2585                 : void
    2586               0 : PPluginInstanceChild::DestroySubtree(ActorDestroyReason why)
    2587                 : {
    2588                 :     // Unregister from our manager.
    2589               0 :     Unregister(mId);
    2590               0 :     mId = 1;
    2591                 : 
    2592               0 :     ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
    2593                 : 
    2594                 :     {
    2595                 :         // Recursively shutting down PPluginBackgroundDestroyer kids
    2596               0 :         InfallibleTArray<PPluginBackgroundDestroyerChild*> kids = mManagedPPluginBackgroundDestroyerChild;
    2597               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2598               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2599                 :         }
    2600                 :     }
    2601                 :     {
    2602                 :         // Recursively shutting down PPluginScriptableObject kids
    2603               0 :         InfallibleTArray<PPluginScriptableObjectChild*> kids = mManagedPPluginScriptableObjectChild;
    2604               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2605               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2606                 :         }
    2607                 :     }
    2608                 :     {
    2609                 :         // Recursively shutting down PBrowserStream kids
    2610               0 :         InfallibleTArray<PBrowserStreamChild*> kids = mManagedPBrowserStreamChild;
    2611               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2612               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2613                 :         }
    2614                 :     }
    2615                 :     {
    2616                 :         // Recursively shutting down PPluginStream kids
    2617               0 :         InfallibleTArray<PPluginStreamChild*> kids = mManagedPPluginStreamChild;
    2618               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2619               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2620                 :         }
    2621                 :     }
    2622                 :     {
    2623                 :         // Recursively shutting down PStreamNotify kids
    2624               0 :         InfallibleTArray<PStreamNotifyChild*> kids = mManagedPStreamNotifyChild;
    2625               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2626               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2627                 :         }
    2628                 :     }
    2629                 :     {
    2630                 :         // Recursively shutting down PPluginSurface kids
    2631               0 :         InfallibleTArray<PPluginSurfaceChild*> kids = mManagedPPluginSurfaceChild;
    2632               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2633               0 :             (kids[i])->DestroySubtree(subtreewhy);
    2634                 :         }
    2635                 :     }
    2636                 : 
    2637                 :     // Finally, destroy "us".
    2638               0 :     ActorDestroy(why);
    2639               0 : }
    2640                 : 
    2641                 : void
    2642               0 : PPluginInstanceChild::DeallocSubtree()
    2643                 : {
    2644                 :     {
    2645                 :         // Recursively deleting PPluginBackgroundDestroyer kids
    2646               0 :         InfallibleTArray<PPluginBackgroundDestroyerChild*>& kids = mManagedPPluginBackgroundDestroyerChild;
    2647               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2648               0 :             (kids[i])->DeallocSubtree();
    2649                 :         }
    2650                 : 
    2651               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2652               0 :             DeallocPPluginBackgroundDestroyer(kids[i]);
    2653                 :         }
    2654               0 :         (mManagedPPluginBackgroundDestroyerChild).Clear();
    2655                 :     }
    2656                 :     {
    2657                 :         // Recursively deleting PPluginScriptableObject kids
    2658               0 :         InfallibleTArray<PPluginScriptableObjectChild*>& kids = mManagedPPluginScriptableObjectChild;
    2659               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2660               0 :             (kids[i])->DeallocSubtree();
    2661                 :         }
    2662                 : 
    2663               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2664               0 :             DeallocPPluginScriptableObject(kids[i]);
    2665                 :         }
    2666               0 :         (mManagedPPluginScriptableObjectChild).Clear();
    2667                 :     }
    2668                 :     {
    2669                 :         // Recursively deleting PBrowserStream kids
    2670               0 :         InfallibleTArray<PBrowserStreamChild*>& kids = mManagedPBrowserStreamChild;
    2671               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2672               0 :             (kids[i])->DeallocSubtree();
    2673                 :         }
    2674                 : 
    2675               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2676               0 :             DeallocPBrowserStream(kids[i]);
    2677                 :         }
    2678               0 :         (mManagedPBrowserStreamChild).Clear();
    2679                 :     }
    2680                 :     {
    2681                 :         // Recursively deleting PPluginStream kids
    2682               0 :         InfallibleTArray<PPluginStreamChild*>& kids = mManagedPPluginStreamChild;
    2683               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2684               0 :             (kids[i])->DeallocSubtree();
    2685                 :         }
    2686                 : 
    2687               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2688               0 :             DeallocPPluginStream(kids[i]);
    2689                 :         }
    2690               0 :         (mManagedPPluginStreamChild).Clear();
    2691                 :     }
    2692                 :     {
    2693                 :         // Recursively deleting PStreamNotify kids
    2694               0 :         InfallibleTArray<PStreamNotifyChild*>& kids = mManagedPStreamNotifyChild;
    2695               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2696               0 :             (kids[i])->DeallocSubtree();
    2697                 :         }
    2698                 : 
    2699               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2700               0 :             DeallocPStreamNotify(kids[i]);
    2701                 :         }
    2702               0 :         (mManagedPStreamNotifyChild).Clear();
    2703                 :     }
    2704                 :     {
    2705                 :         // Recursively deleting PPluginSurface kids
    2706               0 :         InfallibleTArray<PPluginSurfaceChild*>& kids = mManagedPPluginSurfaceChild;
    2707               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2708               0 :             (kids[i])->DeallocSubtree();
    2709                 :         }
    2710                 : 
    2711               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
    2712               0 :             DeallocPPluginSurface(kids[i]);
    2713                 :         }
    2714               0 :         (mManagedPPluginSurfaceChild).Clear();
    2715                 :     }
    2716               0 : }
    2717                 : 
    2718                 : void
    2719               0 : PPluginInstanceChild::Write(
    2720                 :         const SurfaceDescriptor& __v,
    2721                 :         Message* __msg)
    2722                 : {
    2723                 :     typedef SurfaceDescriptor __type;
    2724               0 :     Write(int((__v).type()), __msg);
    2725                 : 
    2726               0 :     switch ((__v).type()) {
    2727                 :     case __type::TShmem:
    2728                 :         {
    2729               0 :             Write((__v).get_Shmem(), __msg);
    2730               0 :             return;
    2731                 :         }
    2732                 :     case __type::TSurfaceDescriptorX11:
    2733                 :         {
    2734               0 :             Write((__v).get_SurfaceDescriptorX11(), __msg);
    2735               0 :             return;
    2736                 :         }
    2737                 :     case __type::TPPluginSurfaceParent:
    2738                 :         {
    2739               0 :             NS_RUNTIMEABORT("wrong side!");
    2740               0 :             return;
    2741                 :         }
    2742                 :     case __type::TPPluginSurfaceChild:
    2743                 :         {
    2744               0 :             Write((__v).get_PPluginSurfaceChild(), __msg, false);
    2745               0 :             return;
    2746                 :         }
    2747                 :     case __type::TIOSurfaceDescriptor:
    2748                 :         {
    2749               0 :             Write((__v).get_IOSurfaceDescriptor(), __msg);
    2750               0 :             return;
    2751                 :         }
    2752                 :     case __type::Tnull_t:
    2753                 :         {
    2754               0 :             Write((__v).get_null_t(), __msg);
    2755               0 :             return;
    2756                 :         }
    2757                 :     default:
    2758                 :         {
    2759               0 :             NS_RUNTIMEABORT("unknown union type");
    2760               0 :             return;
    2761                 :         }
    2762                 :     }
    2763                 : }
    2764                 : 
    2765                 : bool
    2766               0 : PPluginInstanceChild::Read(
    2767                 :         SurfaceDescriptor* __v,
    2768                 :         const Message* __msg,
    2769                 :         void** __iter)
    2770                 : {
    2771                 :     typedef SurfaceDescriptor __type;
    2772                 :     int type;
    2773               0 :     if ((!(Read((&(type)), __msg, __iter)))) {
    2774               0 :         return false;
    2775                 :     }
    2776                 : 
    2777               0 :     switch (type) {
    2778                 :     case __type::TShmem:
    2779                 :         {
    2780               0 :             Shmem tmp = Shmem();
    2781               0 :             (*(__v)) = tmp;
    2782               0 :             return Read((&((__v)->get_Shmem())), __msg, __iter);
    2783                 :         }
    2784                 :     case __type::TSurfaceDescriptorX11:
    2785                 :         {
    2786               0 :             SurfaceDescriptorX11 tmp = SurfaceDescriptorX11();
    2787               0 :             (*(__v)) = tmp;
    2788               0 :             return Read((&((__v)->get_SurfaceDescriptorX11())), __msg, __iter);
    2789                 :         }
    2790                 :     case __type::TPPluginSurfaceParent:
    2791                 :         {
    2792               0 :             PPluginSurfaceChild* tmp = static_cast<PPluginSurfaceChild*>(0);
    2793               0 :             (*(__v)) = tmp;
    2794               0 :             return Read((&((__v)->get_PPluginSurfaceChild())), __msg, __iter, false);
    2795                 :         }
    2796                 :     case __type::TPPluginSurfaceChild:
    2797                 :         {
    2798               0 :             return false;
    2799                 :         }
    2800                 :     case __type::TIOSurfaceDescriptor:
    2801                 :         {
    2802               0 :             IOSurfaceDescriptor tmp = IOSurfaceDescriptor();
    2803               0 :             (*(__v)) = tmp;
    2804               0 :             return Read((&((__v)->get_IOSurfaceDescriptor())), __msg, __iter);
    2805                 :         }
    2806                 :     case __type::Tnull_t:
    2807                 :         {
    2808               0 :             null_t tmp = null_t();
    2809               0 :             (*(__v)) = tmp;
    2810               0 :             return Read((&((__v)->get_null_t())), __msg, __iter);
    2811                 :         }
    2812                 :     default:
    2813                 :         {
    2814               0 :             return false;
    2815                 :         }
    2816                 :     }
    2817                 : }
    2818                 : 
    2819                 : void
    2820               0 : PPluginInstanceChild::Write(
    2821                 :         PPluginStreamChild* __v,
    2822                 :         Message* __msg,
    2823                 :         bool __nullable)
    2824                 : {
    2825                 :     int32 id;
    2826               0 :     if ((!(__v))) {
    2827               0 :         if ((!(__nullable))) {
    2828               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    2829                 :         }
    2830               0 :         id = 0;
    2831                 :     }
    2832                 :     else {
    2833               0 :         id = (__v)->mId;
    2834               0 :         if ((1) == (id)) {
    2835               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    2836                 :         }
    2837                 :     }
    2838                 : 
    2839               0 :     Write(id, __msg);
    2840               0 : }
    2841                 : 
    2842                 : bool
    2843               0 : PPluginInstanceChild::Read(
    2844                 :         PPluginStreamChild** __v,
    2845                 :         const Message* __msg,
    2846                 :         void** __iter,
    2847                 :         bool __nullable)
    2848                 : {
    2849                 :     int32 id;
    2850               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    2851               0 :         return false;
    2852                 :     }
    2853               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    2854               0 :         return false;
    2855                 :     }
    2856                 : 
    2857               0 :     if ((0) == (id)) {
    2858               0 :         (*(__v)) = 0;
    2859                 :     }
    2860                 :     else {
    2861               0 :         (*(__v)) = static_cast<PPluginStreamChild*>(Lookup(id));
    2862               0 :         if ((!((*(__v))))) {
    2863               0 :             return false;
    2864                 :         }
    2865                 :     }
    2866               0 :     return true;
    2867                 : }
    2868                 : 
    2869                 : void
    2870               0 : PPluginInstanceChild::Write(
    2871                 :         const NPRemoteAsyncSurface& __v,
    2872                 :         Message* __msg)
    2873                 : {
    2874               0 :     Write((__v).version(), __msg);
    2875               0 :     Write((__v).size(), __msg);
    2876               0 :     Write((__v).format(), __msg);
    2877               0 :     Write((__v).stride(), __msg);
    2878               0 :     Write((__v).data(), __msg);
    2879               0 :     Write((__v).hostPtr(), __msg);
    2880               0 : }
    2881                 : 
    2882                 : bool
    2883               0 : PPluginInstanceChild::Read(
    2884                 :         NPRemoteAsyncSurface* __v,
    2885                 :         const Message* __msg,
    2886                 :         void** __iter)
    2887                 : {
    2888               0 :     if ((!(Read((&((__v)->version())), __msg, __iter)))) {
    2889               0 :         return false;
    2890                 :     }
    2891               0 :     if ((!(Read((&((__v)->size())), __msg, __iter)))) {
    2892               0 :         return false;
    2893                 :     }
    2894               0 :     if ((!(Read((&((__v)->format())), __msg, __iter)))) {
    2895               0 :         return false;
    2896                 :     }
    2897               0 :     if ((!(Read((&((__v)->stride())), __msg, __iter)))) {
    2898               0 :         return false;
    2899                 :     }
    2900               0 :     if ((!(Read((&((__v)->data())), __msg, __iter)))) {
    2901               0 :         return false;
    2902                 :     }
    2903               0 :     if ((!(Read((&((__v)->hostPtr())), __msg, __iter)))) {
    2904               0 :         return false;
    2905                 :     }
    2906               0 :     return true;
    2907                 : }
    2908                 : 
    2909                 : void
    2910               0 : PPluginInstanceChild::Write(
    2911                 :         Shmem& __v,
    2912                 :         Message* __msg)
    2913                 : {
    2914               0 :     IPC::WriteParam(__msg, __v);
    2915               0 :     (__v).RevokeRights(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    2916               0 :     (__v).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    2917               0 : }
    2918                 : 
    2919                 : bool
    2920               0 : PPluginInstanceChild::Read(
    2921                 :         Shmem* __v,
    2922                 :         const Message* __msg,
    2923                 :         void** __iter)
    2924                 : {
    2925               0 :     Shmem tmp;
    2926               0 :     if ((!(IPC::ReadParam(__msg, __iter, (&(tmp)))))) {
    2927               0 :         return false;
    2928                 :     }
    2929                 : 
    2930               0 :     Shmem::id_t shmemid = (tmp).Id(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    2931               0 :     Shmem::SharedMemory* rawmem = LookupSharedMemory(shmemid);
    2932               0 :     if (rawmem) {
    2933               0 :         (*(__v)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, shmemid);
    2934               0 :         return true;
    2935                 :     }
    2936               0 :     return false;
    2937                 : }
    2938                 : 
    2939                 : void
    2940               0 : PPluginInstanceChild::Write(
    2941                 :         PPluginSurfaceChild* __v,
    2942                 :         Message* __msg,
    2943                 :         bool __nullable)
    2944                 : {
    2945                 :     int32 id;
    2946               0 :     if ((!(__v))) {
    2947               0 :         if ((!(__nullable))) {
    2948               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    2949                 :         }
    2950               0 :         id = 0;
    2951                 :     }
    2952                 :     else {
    2953               0 :         id = (__v)->mId;
    2954               0 :         if ((1) == (id)) {
    2955               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    2956                 :         }
    2957                 :     }
    2958                 : 
    2959               0 :     Write(id, __msg);
    2960               0 : }
    2961                 : 
    2962                 : bool
    2963               0 : PPluginInstanceChild::Read(
    2964                 :         PPluginSurfaceChild** __v,
    2965                 :         const Message* __msg,
    2966                 :         void** __iter,
    2967                 :         bool __nullable)
    2968                 : {
    2969                 :     int32 id;
    2970               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    2971               0 :         return false;
    2972                 :     }
    2973               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    2974               0 :         return false;
    2975                 :     }
    2976                 : 
    2977               0 :     if ((0) == (id)) {
    2978               0 :         (*(__v)) = 0;
    2979                 :     }
    2980                 :     else {
    2981               0 :         (*(__v)) = static_cast<PPluginSurfaceChild*>(Lookup(id));
    2982               0 :         if ((!((*(__v))))) {
    2983               0 :             return false;
    2984                 :         }
    2985                 :     }
    2986               0 :     return true;
    2987                 : }
    2988                 : 
    2989                 : void
    2990               0 : PPluginInstanceChild::Write(
    2991                 :         PPluginBackgroundDestroyerChild* __v,
    2992                 :         Message* __msg,
    2993                 :         bool __nullable)
    2994                 : {
    2995                 :     int32 id;
    2996               0 :     if ((!(__v))) {
    2997               0 :         if ((!(__nullable))) {
    2998               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    2999                 :         }
    3000               0 :         id = 0;
    3001                 :     }
    3002                 :     else {
    3003               0 :         id = (__v)->mId;
    3004               0 :         if ((1) == (id)) {
    3005               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    3006                 :         }
    3007                 :     }
    3008                 : 
    3009               0 :     Write(id, __msg);
    3010               0 : }
    3011                 : 
    3012                 : bool
    3013               0 : PPluginInstanceChild::Read(
    3014                 :         PPluginBackgroundDestroyerChild** __v,
    3015                 :         const Message* __msg,
    3016                 :         void** __iter,
    3017                 :         bool __nullable)
    3018                 : {
    3019                 :     int32 id;
    3020               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    3021               0 :         return false;
    3022                 :     }
    3023               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    3024               0 :         return false;
    3025                 :     }
    3026                 : 
    3027               0 :     if ((0) == (id)) {
    3028               0 :         (*(__v)) = 0;
    3029                 :     }
    3030                 :     else {
    3031               0 :         (*(__v)) = static_cast<PPluginBackgroundDestroyerChild*>(Lookup(id));
    3032               0 :         if ((!((*(__v))))) {
    3033               0 :             return false;
    3034                 :         }
    3035                 :     }
    3036               0 :     return true;
    3037                 : }
    3038                 : 
    3039                 : void
    3040               0 : PPluginInstanceChild::Write(
    3041                 :         const IOSurfaceDescriptor& __v,
    3042                 :         Message* __msg)
    3043                 : {
    3044               0 :     Write((__v).surfaceId(), __msg);
    3045               0 : }
    3046                 : 
    3047                 : bool
    3048               0 : PPluginInstanceChild::Read(
    3049                 :         IOSurfaceDescriptor* __v,
    3050                 :         const Message* __msg,
    3051                 :         void** __iter)
    3052                 : {
    3053               0 :     if ((!(Read((&((__v)->surfaceId())), __msg, __iter)))) {
    3054               0 :         return false;
    3055                 :     }
    3056               0 :     return true;
    3057                 : }
    3058                 : 
    3059                 : void
    3060               0 : PPluginInstanceChild::Write(
    3061                 :         PBrowserStreamChild* __v,
    3062                 :         Message* __msg,
    3063                 :         bool __nullable)
    3064                 : {
    3065                 :     int32 id;
    3066               0 :     if ((!(__v))) {
    3067               0 :         if ((!(__nullable))) {
    3068               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    3069                 :         }
    3070               0 :         id = 0;
    3071                 :     }
    3072                 :     else {
    3073               0 :         id = (__v)->mId;
    3074               0 :         if ((1) == (id)) {
    3075               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    3076                 :         }
    3077                 :     }
    3078                 : 
    3079               0 :     Write(id, __msg);
    3080               0 : }
    3081                 : 
    3082                 : bool
    3083               0 : PPluginInstanceChild::Read(
    3084                 :         PBrowserStreamChild** __v,
    3085                 :         const Message* __msg,
    3086                 :         void** __iter,
    3087                 :         bool __nullable)
    3088                 : {
    3089                 :     int32 id;
    3090               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    3091               0 :         return false;
    3092                 :     }
    3093               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    3094               0 :         return false;
    3095                 :     }
    3096                 : 
    3097               0 :     if ((0) == (id)) {
    3098               0 :         (*(__v)) = 0;
    3099                 :     }
    3100                 :     else {
    3101               0 :         (*(__v)) = static_cast<PBrowserStreamChild*>(Lookup(id));
    3102               0 :         if ((!((*(__v))))) {
    3103               0 :             return false;
    3104                 :         }
    3105                 :     }
    3106               0 :     return true;
    3107                 : }
    3108                 : 
    3109                 : void
    3110               0 : PPluginInstanceChild::Write(
    3111                 :         PPluginInstanceChild* __v,
    3112                 :         Message* __msg,
    3113                 :         bool __nullable)
    3114                 : {
    3115                 :     int32 id;
    3116               0 :     if ((!(__v))) {
    3117               0 :         if ((!(__nullable))) {
    3118               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    3119                 :         }
    3120               0 :         id = 0;
    3121                 :     }
    3122                 :     else {
    3123               0 :         id = (__v)->mId;
    3124               0 :         if ((1) == (id)) {
    3125               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    3126                 :         }
    3127                 :     }
    3128                 : 
    3129               0 :     Write(id, __msg);
    3130               0 : }
    3131                 : 
    3132                 : bool
    3133               0 : PPluginInstanceChild::Read(
    3134                 :         PPluginInstanceChild** __v,
    3135                 :         const Message* __msg,
    3136                 :         void** __iter,
    3137                 :         bool __nullable)
    3138                 : {
    3139                 :     int32 id;
    3140               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    3141               0 :         return false;
    3142                 :     }
    3143               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    3144               0 :         return false;
    3145                 :     }
    3146                 : 
    3147               0 :     if ((0) == (id)) {
    3148               0 :         (*(__v)) = 0;
    3149                 :     }
    3150                 :     else {
    3151               0 :         (*(__v)) = static_cast<PPluginInstanceChild*>(Lookup(id));
    3152               0 :         if ((!((*(__v))))) {
    3153               0 :             return false;
    3154                 :         }
    3155                 :     }
    3156               0 :     return true;
    3157                 : }
    3158                 : 
    3159                 : void
    3160               0 : PPluginInstanceChild::Write(
    3161                 :         const OptionalShmem& __v,
    3162                 :         Message* __msg)
    3163                 : {
    3164                 :     typedef OptionalShmem __type;
    3165               0 :     Write(int((__v).type()), __msg);
    3166                 : 
    3167               0 :     switch ((__v).type()) {
    3168                 :     case __type::TShmem:
    3169                 :         {
    3170               0 :             Write((__v).get_Shmem(), __msg);
    3171               0 :             return;
    3172                 :         }
    3173                 :     case __type::Tnull_t:
    3174                 :         {
    3175               0 :             Write((__v).get_null_t(), __msg);
    3176               0 :             return;
    3177                 :         }
    3178                 :     default:
    3179                 :         {
    3180               0 :             NS_RUNTIMEABORT("unknown union type");
    3181               0 :             return;
    3182                 :         }
    3183                 :     }
    3184                 : }
    3185                 : 
    3186                 : bool
    3187               0 : PPluginInstanceChild::Read(
    3188                 :         OptionalShmem* __v,
    3189                 :         const Message* __msg,
    3190                 :         void** __iter)
    3191                 : {
    3192                 :     typedef OptionalShmem __type;
    3193                 :     int type;
    3194               0 :     if ((!(Read((&(type)), __msg, __iter)))) {
    3195               0 :         return false;
    3196                 :     }
    3197                 : 
    3198               0 :     switch (type) {
    3199                 :     case __type::TShmem:
    3200                 :         {
    3201               0 :             Shmem tmp = Shmem();
    3202               0 :             (*(__v)) = tmp;
    3203               0 :             return Read((&((__v)->get_Shmem())), __msg, __iter);
    3204                 :         }
    3205                 :     case __type::Tnull_t:
    3206                 :         {
    3207               0 :             null_t tmp = null_t();
    3208               0 :             (*(__v)) = tmp;
    3209               0 :             return Read((&((__v)->get_null_t())), __msg, __iter);
    3210                 :         }
    3211                 :     default:
    3212                 :         {
    3213               0 :             return false;
    3214                 :         }
    3215                 :     }
    3216                 : }
    3217                 : 
    3218                 : void
    3219               0 : PPluginInstanceChild::Write(
    3220                 :         PStreamNotifyChild* __v,
    3221                 :         Message* __msg,
    3222                 :         bool __nullable)
    3223                 : {
    3224                 :     int32 id;
    3225               0 :     if ((!(__v))) {
    3226               0 :         if ((!(__nullable))) {
    3227               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    3228                 :         }
    3229               0 :         id = 0;
    3230                 :     }
    3231                 :     else {
    3232               0 :         id = (__v)->mId;
    3233               0 :         if ((1) == (id)) {
    3234               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    3235                 :         }
    3236                 :     }
    3237                 : 
    3238               0 :     Write(id, __msg);
    3239               0 : }
    3240                 : 
    3241                 : bool
    3242               0 : PPluginInstanceChild::Read(
    3243                 :         PStreamNotifyChild** __v,
    3244                 :         const Message* __msg,
    3245                 :         void** __iter,
    3246                 :         bool __nullable)
    3247                 : {
    3248                 :     int32 id;
    3249               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    3250               0 :         return false;
    3251                 :     }
    3252               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    3253               0 :         return false;
    3254                 :     }
    3255                 : 
    3256               0 :     if ((0) == (id)) {
    3257               0 :         (*(__v)) = 0;
    3258                 :     }
    3259                 :     else {
    3260               0 :         (*(__v)) = static_cast<PStreamNotifyChild*>(Lookup(id));
    3261               0 :         if ((!((*(__v))))) {
    3262               0 :             return false;
    3263                 :         }
    3264                 :     }
    3265               0 :     return true;
    3266                 : }
    3267                 : 
    3268                 : void
    3269               0 : PPluginInstanceChild::Write(
    3270                 :         const AsyncSurfaceDescriptor& __v,
    3271                 :         Message* __msg)
    3272                 : {
    3273                 :     typedef AsyncSurfaceDescriptor __type;
    3274               0 :     Write(int((__v).type()), __msg);
    3275                 : 
    3276               0 :     switch ((__v).type()) {
    3277                 :     case __type::TShmem:
    3278                 :         {
    3279               0 :             Write((__v).get_Shmem(), __msg);
    3280               0 :             return;
    3281                 :         }
    3282                 :     case __type::TDXGISharedSurfaceHandle:
    3283                 :         {
    3284               0 :             Write((__v).get_DXGISharedSurfaceHandle(), __msg);
    3285               0 :             return;
    3286                 :         }
    3287                 :     default:
    3288                 :         {
    3289               0 :             NS_RUNTIMEABORT("unknown union type");
    3290               0 :             return;
    3291                 :         }
    3292                 :     }
    3293                 : }
    3294                 : 
    3295                 : bool
    3296               0 : PPluginInstanceChild::Read(
    3297                 :         AsyncSurfaceDescriptor* __v,
    3298                 :         const Message* __msg,
    3299                 :         void** __iter)
    3300                 : {
    3301                 :     typedef AsyncSurfaceDescriptor __type;
    3302                 :     int type;
    3303               0 :     if ((!(Read((&(type)), __msg, __iter)))) {
    3304               0 :         return false;
    3305                 :     }
    3306                 : 
    3307               0 :     switch (type) {
    3308                 :     case __type::TShmem:
    3309                 :         {
    3310               0 :             Shmem tmp = Shmem();
    3311               0 :             (*(__v)) = tmp;
    3312               0 :             return Read((&((__v)->get_Shmem())), __msg, __iter);
    3313                 :         }
    3314                 :     case __type::TDXGISharedSurfaceHandle:
    3315                 :         {
    3316               0 :             DXGISharedSurfaceHandle tmp = DXGISharedSurfaceHandle();
    3317               0 :             (*(__v)) = tmp;
    3318               0 :             return Read((&((__v)->get_DXGISharedSurfaceHandle())), __msg, __iter);
    3319                 :         }
    3320                 :     default:
    3321                 :         {
    3322               0 :             return false;
    3323                 :         }
    3324                 :     }
    3325                 : }
    3326                 : 
    3327                 : void
    3328               0 : PPluginInstanceChild::Write(
    3329                 :         PPluginScriptableObjectChild* __v,
    3330                 :         Message* __msg,
    3331                 :         bool __nullable)
    3332                 : {
    3333                 :     int32 id;
    3334               0 :     if ((!(__v))) {
    3335               0 :         if ((!(__nullable))) {
    3336               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    3337                 :         }
    3338               0 :         id = 0;
    3339                 :     }
    3340                 :     else {
    3341               0 :         id = (__v)->mId;
    3342               0 :         if ((1) == (id)) {
    3343               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    3344                 :         }
    3345                 :     }
    3346                 : 
    3347               0 :     Write(id, __msg);
    3348               0 : }
    3349                 : 
    3350                 : bool
    3351               0 : PPluginInstanceChild::Read(
    3352                 :         PPluginScriptableObjectChild** __v,
    3353                 :         const Message* __msg,
    3354                 :         void** __iter,
    3355                 :         bool __nullable)
    3356                 : {
    3357                 :     int32 id;
    3358               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    3359               0 :         return false;
    3360                 :     }
    3361               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    3362               0 :         return false;
    3363                 :     }
    3364                 : 
    3365               0 :     if ((0) == (id)) {
    3366               0 :         (*(__v)) = 0;
    3367                 :     }
    3368                 :     else {
    3369               0 :         (*(__v)) = static_cast<PPluginScriptableObjectChild*>(Lookup(id));
    3370               0 :         if ((!((*(__v))))) {
    3371               0 :             return false;
    3372                 :         }
    3373                 :     }
    3374               0 :     return true;
    3375                 : }
    3376                 : 
    3377                 : 
    3378                 : 
    3379                 : } // namespace plugins
    3380                 : } // namespace mozilla

Generated by: LCOV version 1.7