Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/plugins/PPluginSurfaceParent.h"
8 :
9 : #include "mozilla/plugins/PPluginInstanceParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace plugins {
16 :
17 :
18 0 : auto PPluginSurfaceParent::Recv__delete__() -> mozilla::ipc::IPCResult
19 : {
20 0 : return IPC_OK();
21 : }
22 :
23 :
24 0 : MOZ_IMPLICIT PPluginSurfaceParent::PPluginSurfaceParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PPluginSurface::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PPluginSurfaceParent);
29 0 : }
30 :
31 0 : PPluginSurfaceParent::~PPluginSurfaceParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PPluginSurfaceParent);
34 0 : }
35 :
36 0 : auto PPluginSurfaceParent::Manager() const -> PPluginInstanceParent*
37 : {
38 0 : return static_cast<PPluginInstanceParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PPluginSurfaceParent::RemoveManagee(
42 : int32_t aProtocolId,
43 : ProtocolBase* aListener) -> void
44 : {
45 0 : FatalError("unreached");
46 0 : return;
47 : }
48 :
49 0 : auto PPluginSurfaceParent::OnMessageReceived(const Message& msg__) -> PPluginSurfaceParent::Result
50 : {
51 0 : switch ((msg__).type()) {
52 : case PPluginSurface::Msg___delete____ID:
53 : {
54 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginSurfaceParent")) {
55 0 : mozilla::ipc::LogMessageForProtocol("PPluginSurfaceParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
56 : }
57 0 : AUTO_PROFILER_LABEL("PPluginSurface::Msg___delete__", OTHER);
58 :
59 0 : PickleIterator iter__(msg__);
60 : PPluginSurfaceParent* actor;
61 :
62 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
63 0 : FatalError("Error deserializing 'PPluginSurfaceParent'");
64 0 : return MsgValueError;
65 : }
66 : // Sentinel = 'actor'
67 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
68 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PPluginSurfaceParent'");
69 0 : return MsgValueError;
70 : }
71 0 : (msg__).EndRead(iter__, (msg__).type());
72 0 : PPluginSurface::Transition(PPluginSurface::Msg___delete____ID, (&(mState)));
73 0 : if ((!(Recv__delete__()))) {
74 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
75 : // Error handled in mozilla::ipc::IPCResult
76 0 : return MsgProcessingError;
77 : }
78 :
79 :
80 0 : IProtocol* mgr = (actor)->Manager();
81 0 : (actor)->DestroySubtree(Deletion);
82 0 : (actor)->DeallocSubtree();
83 0 : (mgr)->RemoveManagee(PPluginSurfaceMsgStart, actor);
84 :
85 0 : return MsgProcessed;
86 : }
87 : default:
88 : {
89 0 : return MsgNotKnown;
90 : }
91 : }
92 : }
93 :
94 0 : auto PPluginSurfaceParent::OnMessageReceived(
95 : const Message& msg__,
96 : Message*& reply__) -> PPluginSurfaceParent::Result
97 : {
98 0 : return MsgNotKnown;
99 : }
100 :
101 0 : auto PPluginSurfaceParent::OnCallReceived(
102 : const Message& msg__,
103 : Message*& reply__) -> PPluginSurfaceParent::Result
104 : {
105 0 : return MsgNotKnown;
106 : }
107 :
108 0 : auto PPluginSurfaceParent::GetProtocolTypeId() -> int32_t
109 : {
110 0 : return PPluginSurfaceMsgStart;
111 : }
112 :
113 0 : auto PPluginSurfaceParent::ProtocolName() const -> const char*
114 : {
115 0 : return "PPluginSurfaceParent";
116 : }
117 :
118 0 : auto PPluginSurfaceParent::DestroySubtree(ActorDestroyReason why) -> void
119 : {
120 : // Unregister from our manager.
121 0 : Unregister(Id());
122 :
123 : // Reject owning pending promises.
124 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
125 :
126 : // Finally, destroy "us".
127 0 : ActorDestroy(why);
128 0 : }
129 :
130 0 : auto PPluginSurfaceParent::DeallocSubtree() -> void
131 : {
132 0 : }
133 :
134 0 : auto PPluginSurfaceParent::Write(
135 : const PPluginSurfaceParent* v__,
136 : Message* msg__,
137 : bool nullable__) -> void
138 : {
139 : int32_t id;
140 0 : if ((!(v__))) {
141 0 : if ((!(nullable__))) {
142 0 : FatalError("NULL actor value passed to non-nullable param");
143 : }
144 0 : id = 0;
145 : }
146 : else {
147 0 : id = (v__)->Id();
148 0 : if ((1) == (id)) {
149 0 : FatalError("actor has been |delete|d");
150 : }
151 : }
152 :
153 0 : Write(id, msg__);
154 0 : }
155 :
156 0 : auto PPluginSurfaceParent::Read(
157 : PPluginSurfaceParent** v__,
158 : const Message* msg__,
159 : PickleIterator* iter__,
160 : bool nullable__) -> bool
161 : {
162 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PPluginSurface", PPluginSurfaceMsgStart);
163 0 : if ((actor).isNothing()) {
164 0 : return false;
165 : }
166 :
167 0 : (*(v__)) = static_cast<PPluginSurfaceParent*>((actor).value());
168 0 : return true;
169 : }
170 :
171 :
172 :
173 : } // namespace plugins
174 : } // namespace mozilla
|