Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/plugins/PPluginWidgetParent.h"
8 :
9 : #include "mozilla/dom/PBrowserParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace plugins {
16 :
17 :
18 0 : auto PPluginWidgetParent::Recv__delete__() -> mozilla::ipc::IPCResult
19 : {
20 0 : return IPC_OK();
21 : }
22 :
23 :
24 0 : MOZ_IMPLICIT PPluginWidgetParent::PPluginWidgetParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PPluginWidget::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PPluginWidgetParent);
29 0 : }
30 :
31 0 : PPluginWidgetParent::~PPluginWidgetParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PPluginWidgetParent);
34 0 : }
35 :
36 0 : auto PPluginWidgetParent::Manager() const -> PBrowserParent*
37 : {
38 0 : return static_cast<PBrowserParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PPluginWidgetParent::RemoveManagee(
42 : int32_t aProtocolId,
43 : ProtocolBase* aListener) -> void
44 : {
45 0 : FatalError("unreached");
46 0 : return;
47 : }
48 :
49 0 : auto PPluginWidgetParent::OnMessageReceived(const Message& msg__) -> PPluginWidgetParent::Result
50 : {
51 0 : switch ((msg__).type()) {
52 : case PPluginWidget::Msg___delete____ID:
53 : {
54 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
55 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
56 : }
57 0 : AUTO_PROFILER_LABEL("PPluginWidget::Msg___delete__", OTHER);
58 :
59 0 : PickleIterator iter__(msg__);
60 : PPluginWidgetParent* actor;
61 :
62 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
63 0 : FatalError("Error deserializing 'PPluginWidgetParent'");
64 0 : return MsgValueError;
65 : }
66 : // Sentinel = 'actor'
67 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
68 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PPluginWidgetParent'");
69 0 : return MsgValueError;
70 : }
71 0 : (msg__).EndRead(iter__, (msg__).type());
72 0 : PPluginWidget::Transition(PPluginWidget::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(PPluginWidgetMsgStart, actor);
84 :
85 0 : return MsgProcessed;
86 : }
87 : case PPluginWidget::Msg_SetFocus__ID:
88 : {
89 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
90 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
91 : }
92 0 : AUTO_PROFILER_LABEL("PPluginWidget::Msg_SetFocus", OTHER);
93 :
94 0 : PickleIterator iter__(msg__);
95 : bool aRaise;
96 :
97 0 : if ((!(Read((&(aRaise)), (&(msg__)), (&(iter__)))))) {
98 0 : FatalError("Error deserializing 'bool'");
99 0 : return MsgValueError;
100 : }
101 : // Sentinel = 'aRaise'
102 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 902411529)))) {
103 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
104 0 : return MsgValueError;
105 : }
106 0 : (msg__).EndRead(iter__, (msg__).type());
107 0 : PPluginWidget::Transition(PPluginWidget::Msg_SetFocus__ID, (&(mState)));
108 0 : if ((!(RecvSetFocus(mozilla::Move(aRaise))))) {
109 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
110 : // Error handled in mozilla::ipc::IPCResult
111 0 : return MsgProcessingError;
112 : }
113 :
114 0 : return MsgProcessed;
115 : }
116 : default:
117 : {
118 0 : return MsgNotKnown;
119 : }
120 : }
121 : }
122 :
123 0 : auto PPluginWidgetParent::OnMessageReceived(
124 : const Message& msg__,
125 : Message*& reply__) -> PPluginWidgetParent::Result
126 : {
127 0 : switch ((msg__).type()) {
128 : case PPluginWidget::Msg_Create__ID:
129 : {
130 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
131 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
132 : }
133 0 : AUTO_PROFILER_LABEL("PPluginWidget::Msg_Create", OTHER);
134 :
135 0 : PPluginWidget::Transition(PPluginWidget::Msg_Create__ID, (&(mState)));
136 0 : int32_t id__ = Id();
137 : nsresult aResult;
138 : uint64_t aScrollCaptureId;
139 : uintptr_t aPluginInstanceId;
140 0 : if ((!(RecvCreate((&(aResult)), (&(aScrollCaptureId)), (&(aPluginInstanceId)))))) {
141 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
142 : // Error handled in mozilla::ipc::IPCResult
143 0 : return MsgProcessingError;
144 : }
145 :
146 0 : reply__ = PPluginWidget::Reply_Create(id__);
147 :
148 0 : Write(aResult, reply__);
149 : // Sentinel = 'aResult'
150 0 : (reply__)->WriteSentinel(3888726089);
151 0 : Write(aScrollCaptureId, reply__);
152 : // Sentinel = 'aScrollCaptureId'
153 0 : (reply__)->WriteSentinel(3492685879);
154 0 : Write(aPluginInstanceId, reply__);
155 : // Sentinel = 'aPluginInstanceId'
156 0 : (reply__)->WriteSentinel(2621152699);
157 0 : (reply__)->set_sync();
158 0 : (reply__)->set_reply();
159 :
160 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
161 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
162 : }
163 0 : return MsgProcessed;
164 : }
165 : case PPluginWidget::Msg_GetNativePluginPort__ID:
166 : {
167 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
168 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
169 : }
170 0 : AUTO_PROFILER_LABEL("PPluginWidget::Msg_GetNativePluginPort", OTHER);
171 :
172 0 : PPluginWidget::Transition(PPluginWidget::Msg_GetNativePluginPort__ID, (&(mState)));
173 0 : int32_t id__ = Id();
174 : uintptr_t value;
175 0 : if ((!(RecvGetNativePluginPort((&(value)))))) {
176 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
177 : // Error handled in mozilla::ipc::IPCResult
178 0 : return MsgProcessingError;
179 : }
180 :
181 0 : reply__ = PPluginWidget::Reply_GetNativePluginPort(id__);
182 :
183 0 : Write(value, reply__);
184 : // Sentinel = 'value'
185 0 : (reply__)->WriteSentinel(3456818542);
186 0 : (reply__)->set_sync();
187 0 : (reply__)->set_reply();
188 :
189 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
190 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
191 : }
192 0 : return MsgProcessed;
193 : }
194 : case PPluginWidget::Msg_SetNativeChildWindow__ID:
195 : {
196 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
197 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
198 : }
199 0 : AUTO_PROFILER_LABEL("PPluginWidget::Msg_SetNativeChildWindow", OTHER);
200 :
201 0 : PickleIterator iter__(msg__);
202 : uintptr_t childWindow;
203 :
204 0 : if ((!(Read((&(childWindow)), (&(msg__)), (&(iter__)))))) {
205 0 : FatalError("Error deserializing 'uintptr_t'");
206 0 : return MsgValueError;
207 : }
208 : // Sentinel = 'childWindow'
209 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2307824933)))) {
210 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uintptr_t'");
211 0 : return MsgValueError;
212 : }
213 0 : (msg__).EndRead(iter__, (msg__).type());
214 0 : PPluginWidget::Transition(PPluginWidget::Msg_SetNativeChildWindow__ID, (&(mState)));
215 0 : int32_t id__ = Id();
216 0 : if ((!(RecvSetNativeChildWindow(mozilla::Move(childWindow))))) {
217 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
218 : // Error handled in mozilla::ipc::IPCResult
219 0 : return MsgProcessingError;
220 : }
221 :
222 0 : reply__ = PPluginWidget::Reply_SetNativeChildWindow(id__);
223 :
224 0 : (reply__)->set_sync();
225 0 : (reply__)->set_reply();
226 :
227 0 : if (mozilla::ipc::LoggingEnabledFor("PPluginWidgetParent")) {
228 0 : mozilla::ipc::LogMessageForProtocol("PPluginWidgetParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
229 : }
230 0 : return MsgProcessed;
231 : }
232 : default:
233 : {
234 0 : return MsgNotKnown;
235 : }
236 : }
237 : }
238 :
239 0 : auto PPluginWidgetParent::OnCallReceived(
240 : const Message& msg__,
241 : Message*& reply__) -> PPluginWidgetParent::Result
242 : {
243 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
244 : return MsgNotKnown;
245 : }
246 :
247 0 : auto PPluginWidgetParent::GetProtocolTypeId() -> int32_t
248 : {
249 0 : return PPluginWidgetMsgStart;
250 : }
251 :
252 0 : auto PPluginWidgetParent::ProtocolName() const -> const char*
253 : {
254 0 : return "PPluginWidgetParent";
255 : }
256 :
257 0 : auto PPluginWidgetParent::DestroySubtree(ActorDestroyReason why) -> void
258 : {
259 : // Unregister from our manager.
260 0 : Unregister(Id());
261 :
262 : // Reject owning pending promises.
263 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
264 :
265 : // Finally, destroy "us".
266 0 : ActorDestroy(why);
267 0 : }
268 :
269 0 : auto PPluginWidgetParent::DeallocSubtree() -> void
270 : {
271 0 : }
272 :
273 0 : auto PPluginWidgetParent::Write(
274 : const PPluginWidgetParent* v__,
275 : Message* msg__,
276 : bool nullable__) -> void
277 : {
278 : int32_t id;
279 0 : if ((!(v__))) {
280 0 : if ((!(nullable__))) {
281 0 : FatalError("NULL actor value passed to non-nullable param");
282 : }
283 0 : id = 0;
284 : }
285 : else {
286 0 : id = (v__)->Id();
287 0 : if ((1) == (id)) {
288 0 : FatalError("actor has been |delete|d");
289 : }
290 : }
291 :
292 0 : Write(id, msg__);
293 0 : }
294 :
295 0 : auto PPluginWidgetParent::Read(
296 : PPluginWidgetParent** v__,
297 : const Message* msg__,
298 : PickleIterator* iter__,
299 : bool nullable__) -> bool
300 : {
301 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PPluginWidget", PPluginWidgetMsgStart);
302 0 : if ((actor).isNothing()) {
303 0 : return false;
304 : }
305 :
306 0 : (*(v__)) = static_cast<PPluginWidgetParent*>((actor).value());
307 0 : return true;
308 : }
309 :
310 :
311 :
312 : } // namespace plugins
313 : } // namespace mozilla
|