Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/layers/PAPZChild.h"
8 : #include "FrameMetrics.h"
9 : #include "nsRegion.h"
10 :
11 : #include "mozilla/layers/PCompositorBridgeChild.h"
12 :
13 : #include "nsIFile.h"
14 : #include "GeckoProfiler.h"
15 :
16 : namespace mozilla {
17 : namespace layers {
18 :
19 :
20 0 : auto PAPZChild::ActorDestroy(ActorDestroyReason aWhy) -> void
21 : {
22 0 : }
23 :
24 1 : MOZ_IMPLICIT PAPZChild::PAPZChild() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
26 1 : mState(PAPZ::__Dead)
27 : {
28 1 : MOZ_COUNT_CTOR(PAPZChild);
29 1 : }
30 :
31 0 : PAPZChild::~PAPZChild()
32 : {
33 0 : MOZ_COUNT_DTOR(PAPZChild);
34 0 : }
35 :
36 0 : auto PAPZChild::Manager() const -> PCompositorBridgeChild*
37 : {
38 0 : return static_cast<PCompositorBridgeChild*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PAPZChild::Send__delete__(PAPZChild* actor) -> bool
42 : {
43 0 : if ((!(actor))) {
44 0 : return false;
45 : }
46 :
47 0 : IPC::Message* msg__ = PAPZ::Msg___delete__((actor)->Id());
48 :
49 0 : (actor)->Write(actor, msg__, false);
50 : // Sentinel = 'actor'
51 0 : (msg__)->WriteSentinel(875202478);
52 :
53 :
54 :
55 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
56 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
57 : }
58 0 : AUTO_PROFILER_LABEL("PAPZ::Msg___delete__", OTHER);
59 0 : PAPZ::Transition(PAPZ::Msg___delete____ID, (&((actor)->mState)));
60 :
61 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
62 :
63 0 : IProtocol* mgr = (actor)->Manager();
64 0 : (actor)->DestroySubtree(Deletion);
65 0 : (actor)->DeallocSubtree();
66 0 : (mgr)->RemoveManagee(PAPZMsgStart, actor);
67 0 : return sendok__;
68 : }
69 :
70 0 : auto PAPZChild::RemoveManagee(
71 : int32_t aProtocolId,
72 : ProtocolBase* aListener) -> void
73 : {
74 0 : FatalError("unreached");
75 0 : return;
76 : }
77 :
78 0 : auto PAPZChild::OnMessageReceived(const Message& msg__) -> PAPZChild::Result
79 : {
80 0 : switch ((msg__).type()) {
81 : case PAPZ::Reply___delete____ID:
82 : {
83 0 : return MsgProcessed;
84 : }
85 : case PAPZ::Msg_RequestContentRepaint__ID:
86 : {
87 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
88 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
89 : }
90 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_RequestContentRepaint", OTHER);
91 :
92 0 : PickleIterator iter__(msg__);
93 0 : FrameMetrics frame;
94 :
95 0 : if ((!(Read((&(frame)), (&(msg__)), (&(iter__)))))) {
96 0 : FatalError("Error deserializing 'FrameMetrics'");
97 0 : return MsgValueError;
98 : }
99 : // Sentinel = 'frame'
100 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 66854026)))) {
101 0 : mozilla::ipc::SentinelReadError("Error deserializing 'FrameMetrics'");
102 0 : return MsgValueError;
103 : }
104 0 : (msg__).EndRead(iter__, (msg__).type());
105 0 : PAPZ::Transition(PAPZ::Msg_RequestContentRepaint__ID, (&(mState)));
106 0 : if ((!(RecvRequestContentRepaint(mozilla::Move(frame))))) {
107 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
108 : // Error handled in mozilla::ipc::IPCResult
109 0 : return MsgProcessingError;
110 : }
111 :
112 0 : return MsgProcessed;
113 : }
114 : case PAPZ::Msg_UpdateOverscrollVelocity__ID:
115 : {
116 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
117 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
118 : }
119 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollVelocity", OTHER);
120 :
121 0 : PickleIterator iter__(msg__);
122 : float aX;
123 : float aY;
124 : bool aIsRootContent;
125 :
126 0 : if ((!(Read((&(aX)), (&(msg__)), (&(iter__)))))) {
127 0 : FatalError("Error deserializing 'float'");
128 0 : return MsgValueError;
129 : }
130 : // Sentinel = 'aX'
131 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208761)))) {
132 0 : mozilla::ipc::SentinelReadError("Error deserializing 'float'");
133 0 : return MsgValueError;
134 : }
135 0 : if ((!(Read((&(aY)), (&(msg__)), (&(iter__)))))) {
136 0 : FatalError("Error deserializing 'float'");
137 0 : return MsgValueError;
138 : }
139 : // Sentinel = 'aY'
140 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208760)))) {
141 0 : mozilla::ipc::SentinelReadError("Error deserializing 'float'");
142 0 : return MsgValueError;
143 : }
144 0 : if ((!(Read((&(aIsRootContent)), (&(msg__)), (&(iter__)))))) {
145 0 : FatalError("Error deserializing 'bool'");
146 0 : return MsgValueError;
147 : }
148 : // Sentinel = 'aIsRootContent'
149 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 332943914)))) {
150 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
151 0 : return MsgValueError;
152 : }
153 0 : (msg__).EndRead(iter__, (msg__).type());
154 0 : PAPZ::Transition(PAPZ::Msg_UpdateOverscrollVelocity__ID, (&(mState)));
155 0 : if ((!(RecvUpdateOverscrollVelocity(mozilla::Move(aX), mozilla::Move(aY), mozilla::Move(aIsRootContent))))) {
156 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
157 : // Error handled in mozilla::ipc::IPCResult
158 0 : return MsgProcessingError;
159 : }
160 :
161 0 : return MsgProcessed;
162 : }
163 : case PAPZ::Msg_UpdateOverscrollOffset__ID:
164 : {
165 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
166 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
167 : }
168 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_UpdateOverscrollOffset", OTHER);
169 :
170 0 : PickleIterator iter__(msg__);
171 : float aX;
172 : float aY;
173 : bool aIsRootContent;
174 :
175 0 : if ((!(Read((&(aX)), (&(msg__)), (&(iter__)))))) {
176 0 : FatalError("Error deserializing 'float'");
177 0 : return MsgValueError;
178 : }
179 : // Sentinel = 'aX'
180 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208761)))) {
181 0 : mozilla::ipc::SentinelReadError("Error deserializing 'float'");
182 0 : return MsgValueError;
183 : }
184 0 : if ((!(Read((&(aY)), (&(msg__)), (&(iter__)))))) {
185 0 : FatalError("Error deserializing 'float'");
186 0 : return MsgValueError;
187 : }
188 : // Sentinel = 'aY'
189 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208760)))) {
190 0 : mozilla::ipc::SentinelReadError("Error deserializing 'float'");
191 0 : return MsgValueError;
192 : }
193 0 : if ((!(Read((&(aIsRootContent)), (&(msg__)), (&(iter__)))))) {
194 0 : FatalError("Error deserializing 'bool'");
195 0 : return MsgValueError;
196 : }
197 : // Sentinel = 'aIsRootContent'
198 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 332943914)))) {
199 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
200 0 : return MsgValueError;
201 : }
202 0 : (msg__).EndRead(iter__, (msg__).type());
203 0 : PAPZ::Transition(PAPZ::Msg_UpdateOverscrollOffset__ID, (&(mState)));
204 0 : if ((!(RecvUpdateOverscrollOffset(mozilla::Move(aX), mozilla::Move(aY), mozilla::Move(aIsRootContent))))) {
205 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
206 : // Error handled in mozilla::ipc::IPCResult
207 0 : return MsgProcessingError;
208 : }
209 :
210 0 : return MsgProcessed;
211 : }
212 : case PAPZ::Msg_NotifyMozMouseScrollEvent__ID:
213 : {
214 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
215 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
216 : }
217 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyMozMouseScrollEvent", OTHER);
218 :
219 0 : PickleIterator iter__(msg__);
220 : ViewID aScrollId;
221 0 : nsString aEvent;
222 :
223 0 : if ((!(Read((&(aScrollId)), (&(msg__)), (&(iter__)))))) {
224 0 : FatalError("Error deserializing 'ViewID'");
225 0 : return MsgValueError;
226 : }
227 : // Sentinel = 'aScrollId'
228 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4217802004)))) {
229 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
230 0 : return MsgValueError;
231 : }
232 0 : if ((!(Read((&(aEvent)), (&(msg__)), (&(iter__)))))) {
233 0 : FatalError("Error deserializing 'nsString'");
234 0 : return MsgValueError;
235 : }
236 : // Sentinel = 'aEvent'
237 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3531117325)))) {
238 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
239 0 : return MsgValueError;
240 : }
241 0 : (msg__).EndRead(iter__, (msg__).type());
242 0 : PAPZ::Transition(PAPZ::Msg_NotifyMozMouseScrollEvent__ID, (&(mState)));
243 0 : if ((!(RecvNotifyMozMouseScrollEvent(mozilla::Move(aScrollId), mozilla::Move(aEvent))))) {
244 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
245 : // Error handled in mozilla::ipc::IPCResult
246 0 : return MsgProcessingError;
247 : }
248 :
249 0 : return MsgProcessed;
250 : }
251 : case PAPZ::Msg_NotifyAPZStateChange__ID:
252 : {
253 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
254 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
255 : }
256 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAPZStateChange", OTHER);
257 :
258 0 : PickleIterator iter__(msg__);
259 0 : ScrollableLayerGuid aGuid;
260 : APZStateChange aChange;
261 : int aArg;
262 :
263 0 : if ((!(Read((&(aGuid)), (&(msg__)), (&(iter__)))))) {
264 0 : FatalError("Error deserializing 'ScrollableLayerGuid'");
265 0 : return MsgValueError;
266 : }
267 : // Sentinel = 'aGuid'
268 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) {
269 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'");
270 0 : return MsgValueError;
271 : }
272 0 : if ((!(Read((&(aChange)), (&(msg__)), (&(iter__)))))) {
273 0 : FatalError("Error deserializing 'APZStateChange'");
274 0 : return MsgValueError;
275 : }
276 : // Sentinel = 'aChange'
277 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1262903642)))) {
278 0 : mozilla::ipc::SentinelReadError("Error deserializing 'APZStateChange'");
279 0 : return MsgValueError;
280 : }
281 0 : if ((!(Read((&(aArg)), (&(msg__)), (&(iter__)))))) {
282 0 : FatalError("Error deserializing 'int'");
283 0 : return MsgValueError;
284 : }
285 : // Sentinel = 'aArg'
286 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3458203231)))) {
287 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int'");
288 0 : return MsgValueError;
289 : }
290 0 : (msg__).EndRead(iter__, (msg__).type());
291 0 : PAPZ::Transition(PAPZ::Msg_NotifyAPZStateChange__ID, (&(mState)));
292 0 : if ((!(RecvNotifyAPZStateChange(mozilla::Move(aGuid), mozilla::Move(aChange), mozilla::Move(aArg))))) {
293 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
294 : // Error handled in mozilla::ipc::IPCResult
295 0 : return MsgProcessingError;
296 : }
297 :
298 0 : return MsgProcessed;
299 : }
300 : case PAPZ::Msg_NotifyFlushComplete__ID:
301 : {
302 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
303 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
304 : }
305 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyFlushComplete", OTHER);
306 :
307 0 : PAPZ::Transition(PAPZ::Msg_NotifyFlushComplete__ID, (&(mState)));
308 0 : if ((!(RecvNotifyFlushComplete()))) {
309 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
310 : // Error handled in mozilla::ipc::IPCResult
311 0 : return MsgProcessingError;
312 : }
313 :
314 0 : return MsgProcessed;
315 : }
316 : case PAPZ::Msg_NotifyAsyncScrollbarDragRejected__ID:
317 : {
318 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
319 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
320 : }
321 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_NotifyAsyncScrollbarDragRejected", OTHER);
322 :
323 0 : PickleIterator iter__(msg__);
324 : ViewID aScrollId;
325 :
326 0 : if ((!(Read((&(aScrollId)), (&(msg__)), (&(iter__)))))) {
327 0 : FatalError("Error deserializing 'ViewID'");
328 0 : return MsgValueError;
329 : }
330 : // Sentinel = 'aScrollId'
331 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4217802004)))) {
332 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ViewID'");
333 0 : return MsgValueError;
334 : }
335 0 : (msg__).EndRead(iter__, (msg__).type());
336 0 : PAPZ::Transition(PAPZ::Msg_NotifyAsyncScrollbarDragRejected__ID, (&(mState)));
337 0 : if ((!(RecvNotifyAsyncScrollbarDragRejected(mozilla::Move(aScrollId))))) {
338 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
339 : // Error handled in mozilla::ipc::IPCResult
340 0 : return MsgProcessingError;
341 : }
342 :
343 0 : return MsgProcessed;
344 : }
345 : case PAPZ::Msg_Destroy__ID:
346 : {
347 0 : if (mozilla::ipc::LoggingEnabledFor("PAPZChild")) {
348 0 : mozilla::ipc::LogMessageForProtocol("PAPZChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
349 : }
350 0 : AUTO_PROFILER_LABEL("PAPZ::Msg_Destroy", OTHER);
351 :
352 0 : PAPZ::Transition(PAPZ::Msg_Destroy__ID, (&(mState)));
353 0 : if ((!(RecvDestroy()))) {
354 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
355 : // Error handled in mozilla::ipc::IPCResult
356 0 : return MsgProcessingError;
357 : }
358 :
359 0 : return MsgProcessed;
360 : }
361 : default:
362 : {
363 0 : return MsgNotKnown;
364 : }
365 : }
366 : }
367 :
368 0 : auto PAPZChild::OnMessageReceived(
369 : const Message& msg__,
370 : Message*& reply__) -> PAPZChild::Result
371 : {
372 0 : return MsgNotKnown;
373 : }
374 :
375 0 : auto PAPZChild::OnCallReceived(
376 : const Message& msg__,
377 : Message*& reply__) -> PAPZChild::Result
378 : {
379 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
380 : return MsgNotKnown;
381 : }
382 :
383 0 : auto PAPZChild::GetProtocolTypeId() -> int32_t
384 : {
385 0 : return PAPZMsgStart;
386 : }
387 :
388 0 : auto PAPZChild::ProtocolName() const -> const char*
389 : {
390 0 : return "PAPZChild";
391 : }
392 :
393 0 : auto PAPZChild::DestroySubtree(ActorDestroyReason why) -> void
394 : {
395 : // Unregister from our manager.
396 0 : Unregister(Id());
397 :
398 : // Reject owning pending promises.
399 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
400 :
401 : // Finally, destroy "us".
402 0 : ActorDestroy(why);
403 0 : }
404 :
405 0 : auto PAPZChild::DeallocSubtree() -> void
406 : {
407 0 : }
408 :
409 0 : auto PAPZChild::Write(
410 : const PAPZChild* v__,
411 : Message* msg__,
412 : bool nullable__) -> void
413 : {
414 : int32_t id;
415 0 : if ((!(v__))) {
416 0 : if ((!(nullable__))) {
417 0 : FatalError("NULL actor value passed to non-nullable param");
418 : }
419 0 : id = 0;
420 : }
421 : else {
422 0 : id = (v__)->Id();
423 0 : if ((1) == (id)) {
424 0 : FatalError("actor has been |delete|d");
425 : }
426 : }
427 :
428 0 : Write(id, msg__);
429 0 : }
430 :
431 0 : auto PAPZChild::Read(
432 : PAPZChild** v__,
433 : const Message* msg__,
434 : PickleIterator* iter__,
435 : bool nullable__) -> bool
436 : {
437 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PAPZ", PAPZMsgStart);
438 0 : if ((actor).isNothing()) {
439 0 : return false;
440 : }
441 :
442 0 : (*(v__)) = static_cast<PAPZChild*>((actor).value());
443 0 : return true;
444 : }
445 :
446 :
447 :
448 : } // namespace layers
449 : } // namespace mozilla
|