LCOV - app.info - objdir/ipc/ipdl/PPluginInstanceParent.cpp

LCOV - code coverage report
| Current view: | directory - objdir/ipc/ipdl - PPluginInstanceParent.cpp (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 1660 | 0 | 0.0 %
| Date: | 2012-04-21 | Functions: | 101 | 0 | 0.0 %

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

Generated by: LCOV version 1.7