/work/obj-fuzz/ipc/ipdl/PAPZCTreeManagerParent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/layers/PAPZCTreeManagerParent.h" |
8 | | #include "FrameMetrics.h" |
9 | | #include "mozilla/layers/KeyboardMap.h" |
10 | | |
11 | | #include "mozilla/layers/PCompositorBridgeParent.h" |
12 | | |
13 | | #include "nsIFile.h" |
14 | | #include "GeckoProfiler.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace layers { |
18 | | |
19 | | |
20 | | auto PAPZCTreeManagerParent::Recv__delete__() -> mozilla::ipc::IPCResult |
21 | 0 | { |
22 | 0 | return IPC_OK(); |
23 | 0 | } |
24 | | |
25 | | auto PAPZCTreeManagerParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
26 | 0 | { |
27 | 0 | } |
28 | | |
29 | | MOZ_IMPLICIT PAPZCTreeManagerParent::PAPZCTreeManagerParent() : |
30 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
31 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
32 | 0 | { |
33 | 0 | MOZ_COUNT_CTOR(PAPZCTreeManagerParent); |
34 | 0 | } |
35 | | |
36 | | PAPZCTreeManagerParent::~PAPZCTreeManagerParent() |
37 | 0 | { |
38 | 0 | MOZ_COUNT_DTOR(PAPZCTreeManagerParent); |
39 | 0 | } |
40 | | |
41 | | auto PAPZCTreeManagerParent::Manager() const -> PCompositorBridgeParent* |
42 | 0 | { |
43 | 0 | return static_cast<PCompositorBridgeParent*>(IProtocol::Manager()); |
44 | 0 | } |
45 | | |
46 | | auto PAPZCTreeManagerParent::SendHandleTap( |
47 | | const TapType& aType, |
48 | | const LayoutDevicePoint& point, |
49 | | const Modifiers& aModifiers, |
50 | | const ScrollableLayerGuid& aGuid, |
51 | | const uint64_t& aInputBlockId) -> bool |
52 | 0 | { |
53 | 0 | IPC::Message* msg__ = PAPZCTreeManager::Msg_HandleTap(Id()); |
54 | 0 |
|
55 | 0 | WriteIPDLParam(msg__, this, aType); |
56 | 0 | // Sentinel = 'aType' |
57 | 0 | (msg__)->WriteSentinel(1819585676); |
58 | 0 | WriteIPDLParam(msg__, this, point); |
59 | 0 | // Sentinel = 'point' |
60 | 0 | (msg__)->WriteSentinel(3028833543); |
61 | 0 | WriteIPDLParam(msg__, this, aModifiers); |
62 | 0 | // Sentinel = 'aModifiers' |
63 | 0 | (msg__)->WriteSentinel(261964171); |
64 | 0 | WriteIPDLParam(msg__, this, aGuid); |
65 | 0 | // Sentinel = 'aGuid' |
66 | 0 | (msg__)->WriteSentinel(2369323719); |
67 | 0 | WriteIPDLParam(msg__, this, aInputBlockId); |
68 | 0 | // Sentinel = 'aInputBlockId' |
69 | 0 | (msg__)->WriteSentinel(3003300100); |
70 | 0 |
|
71 | 0 |
|
72 | 0 |
|
73 | 0 |
|
74 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
75 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
76 | 0 | } |
77 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_HandleTap", OTHER); |
78 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
79 | 0 | mozilla::ipc::LogicError("Transition error"); |
80 | 0 | } |
81 | 0 |
|
82 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
83 | 0 | return sendok__; |
84 | 0 | } |
85 | | |
86 | | auto PAPZCTreeManagerParent::SendNotifyPinchGesture( |
87 | | const PinchGestureType& aType, |
88 | | const ScrollableLayerGuid& aGuid, |
89 | | const LayoutDeviceCoord& aSpanChange, |
90 | | const Modifiers& aModifiers) -> bool |
91 | 0 | { |
92 | 0 | IPC::Message* msg__ = PAPZCTreeManager::Msg_NotifyPinchGesture(Id()); |
93 | 0 |
|
94 | 0 | WriteIPDLParam(msg__, this, aType); |
95 | 0 | // Sentinel = 'aType' |
96 | 0 | (msg__)->WriteSentinel(1819585676); |
97 | 0 | WriteIPDLParam(msg__, this, aGuid); |
98 | 0 | // Sentinel = 'aGuid' |
99 | 0 | (msg__)->WriteSentinel(2369323719); |
100 | 0 | WriteIPDLParam(msg__, this, aSpanChange); |
101 | 0 | // Sentinel = 'aSpanChange' |
102 | 0 | (msg__)->WriteSentinel(2144160218); |
103 | 0 | WriteIPDLParam(msg__, this, aModifiers); |
104 | 0 | // Sentinel = 'aModifiers' |
105 | 0 | (msg__)->WriteSentinel(261964171); |
106 | 0 |
|
107 | 0 |
|
108 | 0 |
|
109 | 0 |
|
110 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
111 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
112 | 0 | } |
113 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_NotifyPinchGesture", OTHER); |
114 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
115 | 0 | mozilla::ipc::LogicError("Transition error"); |
116 | 0 | } |
117 | 0 |
|
118 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
119 | 0 | return sendok__; |
120 | 0 | } |
121 | | |
122 | | auto PAPZCTreeManagerParent::SendCancelAutoscroll(const ViewID& aScrollId) -> bool |
123 | 0 | { |
124 | 0 | IPC::Message* msg__ = PAPZCTreeManager::Msg_CancelAutoscroll(Id()); |
125 | 0 |
|
126 | 0 | WriteIPDLParam(msg__, this, aScrollId); |
127 | 0 | // Sentinel = 'aScrollId' |
128 | 0 | (msg__)->WriteSentinel(4217802004); |
129 | 0 |
|
130 | 0 |
|
131 | 0 |
|
132 | 0 |
|
133 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
134 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
135 | 0 | } |
136 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_CancelAutoscroll", OTHER); |
137 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
138 | 0 | mozilla::ipc::LogicError("Transition error"); |
139 | 0 | } |
140 | 0 |
|
141 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
142 | 0 | return sendok__; |
143 | 0 | } |
144 | | |
145 | | auto PAPZCTreeManagerParent::RemoveManagee( |
146 | | int32_t aProtocolId, |
147 | | IProtocol* aListener) -> void |
148 | 0 | { |
149 | 0 | FatalError("unreached"); |
150 | 0 | return; |
151 | 0 | } |
152 | | |
153 | | auto PAPZCTreeManagerParent::OnMessageReceived(const Message& msg__) -> PAPZCTreeManagerParent::Result |
154 | 0 | { |
155 | 0 | switch ((msg__).type()) { |
156 | 0 | case PAPZCTreeManager::Msg_ZoomToRect__ID: |
157 | 0 | { |
158 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
159 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
160 | 0 | } |
161 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_ZoomToRect", OTHER); |
162 | 0 |
|
163 | 0 | PickleIterator iter__(msg__); |
164 | 0 | ScrollableLayerGuid aGuid; |
165 | 0 | CSSRect aRect; |
166 | 0 | uint32_t Flags; |
167 | 0 |
|
168 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGuid)))))) { |
169 | 0 | FatalError("Error deserializing 'ScrollableLayerGuid'"); |
170 | 0 | return MsgValueError; |
171 | 0 | } |
172 | 0 | // Sentinel = 'aGuid' |
173 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) { |
174 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'"); |
175 | 0 | return MsgValueError; |
176 | 0 | } |
177 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRect)))))) { |
178 | 0 | FatalError("Error deserializing 'CSSRect'"); |
179 | 0 | return MsgValueError; |
180 | 0 | } |
181 | 0 | // Sentinel = 'aRect' |
182 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1014228594)))) { |
183 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CSSRect'"); |
184 | 0 | return MsgValueError; |
185 | 0 | } |
186 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(Flags)))))) { |
187 | 0 | FatalError("Error deserializing 'uint32_t'"); |
188 | 0 | return MsgValueError; |
189 | 0 | } |
190 | 0 | // Sentinel = 'Flags' |
191 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 394072532)))) { |
192 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
193 | 0 | return MsgValueError; |
194 | 0 | } |
195 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
196 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
197 | 0 | FatalError("Transition error"); |
198 | 0 | return MsgValueError; |
199 | 0 | } |
200 | 0 | if ((!(RecvZoomToRect(aGuid, aRect, Flags)))) { |
201 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
202 | 0 | // Error handled in mozilla::ipc::IPCResult |
203 | 0 | return MsgProcessingError; |
204 | 0 | } |
205 | 0 | |
206 | 0 | return MsgProcessed; |
207 | 0 | } |
208 | 0 | case PAPZCTreeManager::Msg_ContentReceivedInputBlock__ID: |
209 | 0 | { |
210 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
211 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
212 | 0 | } |
213 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_ContentReceivedInputBlock", OTHER); |
214 | 0 |
|
215 | 0 | PickleIterator iter__(msg__); |
216 | 0 | uint64_t aInputBlockId; |
217 | 0 | bool PreventDefault; |
218 | 0 |
|
219 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aInputBlockId)))))) { |
220 | 0 | FatalError("Error deserializing 'uint64_t'"); |
221 | 0 | return MsgValueError; |
222 | 0 | } |
223 | 0 | // Sentinel = 'aInputBlockId' |
224 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3003300100)))) { |
225 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
226 | 0 | return MsgValueError; |
227 | 0 | } |
228 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(PreventDefault)))))) { |
229 | 0 | FatalError("Error deserializing 'bool'"); |
230 | 0 | return MsgValueError; |
231 | 0 | } |
232 | 0 | // Sentinel = 'PreventDefault' |
233 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3434909451)))) { |
234 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
235 | 0 | return MsgValueError; |
236 | 0 | } |
237 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
238 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
239 | 0 | FatalError("Transition error"); |
240 | 0 | return MsgValueError; |
241 | 0 | } |
242 | 0 | if ((!(RecvContentReceivedInputBlock(aInputBlockId, PreventDefault)))) { |
243 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
244 | 0 | // Error handled in mozilla::ipc::IPCResult |
245 | 0 | return MsgProcessingError; |
246 | 0 | } |
247 | 0 | |
248 | 0 | return MsgProcessed; |
249 | 0 | } |
250 | 0 | case PAPZCTreeManager::Msg_SetTargetAPZC__ID: |
251 | 0 | { |
252 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
253 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
254 | 0 | } |
255 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_SetTargetAPZC", OTHER); |
256 | 0 |
|
257 | 0 | PickleIterator iter__(msg__); |
258 | 0 | uint64_t aInputBlockId; |
259 | 0 | nsTArray<ScrollableLayerGuid> Targets; |
260 | 0 |
|
261 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aInputBlockId)))))) { |
262 | 0 | FatalError("Error deserializing 'uint64_t'"); |
263 | 0 | return MsgValueError; |
264 | 0 | } |
265 | 0 | // Sentinel = 'aInputBlockId' |
266 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3003300100)))) { |
267 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
268 | 0 | return MsgValueError; |
269 | 0 | } |
270 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(Targets)))))) { |
271 | 0 | FatalError("Error deserializing 'nsTArray'"); |
272 | 0 | return MsgValueError; |
273 | 0 | } |
274 | 0 | // Sentinel = 'Targets' |
275 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1117257085)))) { |
276 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
277 | 0 | return MsgValueError; |
278 | 0 | } |
279 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
280 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
281 | 0 | FatalError("Transition error"); |
282 | 0 | return MsgValueError; |
283 | 0 | } |
284 | 0 | if ((!(RecvSetTargetAPZC(aInputBlockId, std::move(Targets))))) { |
285 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
286 | 0 | // Error handled in mozilla::ipc::IPCResult |
287 | 0 | return MsgProcessingError; |
288 | 0 | } |
289 | 0 | |
290 | 0 | return MsgProcessed; |
291 | 0 | } |
292 | 0 | case PAPZCTreeManager::Msg_UpdateZoomConstraints__ID: |
293 | 0 | { |
294 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
295 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
296 | 0 | } |
297 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_UpdateZoomConstraints", OTHER); |
298 | 0 |
|
299 | 0 | PickleIterator iter__(msg__); |
300 | 0 | ScrollableLayerGuid aGuid; |
301 | 0 | MaybeZoomConstraints aConstraints; |
302 | 0 |
|
303 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGuid)))))) { |
304 | 0 | FatalError("Error deserializing 'ScrollableLayerGuid'"); |
305 | 0 | return MsgValueError; |
306 | 0 | } |
307 | 0 | // Sentinel = 'aGuid' |
308 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) { |
309 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'"); |
310 | 0 | return MsgValueError; |
311 | 0 | } |
312 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aConstraints)))))) { |
313 | 0 | FatalError("Error deserializing 'MaybeZoomConstraints'"); |
314 | 0 | return MsgValueError; |
315 | 0 | } |
316 | 0 | // Sentinel = 'aConstraints' |
317 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4151473199)))) { |
318 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'MaybeZoomConstraints'"); |
319 | 0 | return MsgValueError; |
320 | 0 | } |
321 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
322 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
323 | 0 | FatalError("Transition error"); |
324 | 0 | return MsgValueError; |
325 | 0 | } |
326 | 0 | if ((!(RecvUpdateZoomConstraints(aGuid, aConstraints)))) { |
327 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
328 | 0 | // Error handled in mozilla::ipc::IPCResult |
329 | 0 | return MsgProcessingError; |
330 | 0 | } |
331 | 0 | |
332 | 0 | return MsgProcessed; |
333 | 0 | } |
334 | 0 | case PAPZCTreeManager::Msg_SetKeyboardMap__ID: |
335 | 0 | { |
336 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
337 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
338 | 0 | } |
339 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_SetKeyboardMap", OTHER); |
340 | 0 |
|
341 | 0 | PickleIterator iter__(msg__); |
342 | 0 | KeyboardMap aKeyboardMap; |
343 | 0 |
|
344 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aKeyboardMap)))))) { |
345 | 0 | FatalError("Error deserializing 'KeyboardMap'"); |
346 | 0 | return MsgValueError; |
347 | 0 | } |
348 | 0 | // Sentinel = 'aKeyboardMap' |
349 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4227938288)))) { |
350 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'KeyboardMap'"); |
351 | 0 | return MsgValueError; |
352 | 0 | } |
353 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
354 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
355 | 0 | FatalError("Transition error"); |
356 | 0 | return MsgValueError; |
357 | 0 | } |
358 | 0 | if ((!(RecvSetKeyboardMap(aKeyboardMap)))) { |
359 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
360 | 0 | // Error handled in mozilla::ipc::IPCResult |
361 | 0 | return MsgProcessingError; |
362 | 0 | } |
363 | 0 | |
364 | 0 | return MsgProcessed; |
365 | 0 | } |
366 | 0 | case PAPZCTreeManager::Msg_SetDPI__ID: |
367 | 0 | { |
368 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
369 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
370 | 0 | } |
371 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_SetDPI", OTHER); |
372 | 0 |
|
373 | 0 | PickleIterator iter__(msg__); |
374 | 0 | float aDpiValue; |
375 | 0 |
|
376 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDpiValue)))))) { |
377 | 0 | FatalError("Error deserializing 'float'"); |
378 | 0 | return MsgValueError; |
379 | 0 | } |
380 | 0 | // Sentinel = 'aDpiValue' |
381 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1134572304)))) { |
382 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'float'"); |
383 | 0 | return MsgValueError; |
384 | 0 | } |
385 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
386 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
387 | 0 | FatalError("Transition error"); |
388 | 0 | return MsgValueError; |
389 | 0 | } |
390 | 0 | if ((!(RecvSetDPI(aDpiValue)))) { |
391 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
392 | 0 | // Error handled in mozilla::ipc::IPCResult |
393 | 0 | return MsgProcessingError; |
394 | 0 | } |
395 | 0 | |
396 | 0 | return MsgProcessed; |
397 | 0 | } |
398 | 0 | case PAPZCTreeManager::Msg_SetAllowedTouchBehavior__ID: |
399 | 0 | { |
400 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
401 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
402 | 0 | } |
403 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_SetAllowedTouchBehavior", OTHER); |
404 | 0 |
|
405 | 0 | PickleIterator iter__(msg__); |
406 | 0 | uint64_t aInputBlockId; |
407 | 0 | nsTArray<TouchBehaviorFlags> aValues; |
408 | 0 |
|
409 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aInputBlockId)))))) { |
410 | 0 | FatalError("Error deserializing 'uint64_t'"); |
411 | 0 | return MsgValueError; |
412 | 0 | } |
413 | 0 | // Sentinel = 'aInputBlockId' |
414 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3003300100)))) { |
415 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
416 | 0 | return MsgValueError; |
417 | 0 | } |
418 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aValues)))))) { |
419 | 0 | FatalError("Error deserializing 'nsTArray'"); |
420 | 0 | return MsgValueError; |
421 | 0 | } |
422 | 0 | // Sentinel = 'aValues' |
423 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 223787060)))) { |
424 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
425 | 0 | return MsgValueError; |
426 | 0 | } |
427 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
428 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
429 | 0 | FatalError("Transition error"); |
430 | 0 | return MsgValueError; |
431 | 0 | } |
432 | 0 | if ((!(RecvSetAllowedTouchBehavior(aInputBlockId, std::move(aValues))))) { |
433 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
434 | 0 | // Error handled in mozilla::ipc::IPCResult |
435 | 0 | return MsgProcessingError; |
436 | 0 | } |
437 | 0 | |
438 | 0 | return MsgProcessed; |
439 | 0 | } |
440 | 0 | case PAPZCTreeManager::Msg_StartScrollbarDrag__ID: |
441 | 0 | { |
442 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
443 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
444 | 0 | } |
445 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_StartScrollbarDrag", OTHER); |
446 | 0 |
|
447 | 0 | PickleIterator iter__(msg__); |
448 | 0 | ScrollableLayerGuid aGuid; |
449 | 0 | AsyncDragMetrics aDragMetrics; |
450 | 0 |
|
451 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGuid)))))) { |
452 | 0 | FatalError("Error deserializing 'ScrollableLayerGuid'"); |
453 | 0 | return MsgValueError; |
454 | 0 | } |
455 | 0 | // Sentinel = 'aGuid' |
456 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) { |
457 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'"); |
458 | 0 | return MsgValueError; |
459 | 0 | } |
460 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDragMetrics)))))) { |
461 | 0 | FatalError("Error deserializing 'AsyncDragMetrics'"); |
462 | 0 | return MsgValueError; |
463 | 0 | } |
464 | 0 | // Sentinel = 'aDragMetrics' |
465 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2529840026)))) { |
466 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'AsyncDragMetrics'"); |
467 | 0 | return MsgValueError; |
468 | 0 | } |
469 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
470 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
471 | 0 | FatalError("Transition error"); |
472 | 0 | return MsgValueError; |
473 | 0 | } |
474 | 0 | if ((!(RecvStartScrollbarDrag(aGuid, aDragMetrics)))) { |
475 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
476 | 0 | // Error handled in mozilla::ipc::IPCResult |
477 | 0 | return MsgProcessingError; |
478 | 0 | } |
479 | 0 | |
480 | 0 | return MsgProcessed; |
481 | 0 | } |
482 | 0 | case PAPZCTreeManager::Msg_StartAutoscroll__ID: |
483 | 0 | { |
484 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
485 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
486 | 0 | } |
487 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_StartAutoscroll", OTHER); |
488 | 0 |
|
489 | 0 | PickleIterator iter__(msg__); |
490 | 0 | ScrollableLayerGuid aGuid; |
491 | 0 | ScreenPoint aAnchorLocation; |
492 | 0 |
|
493 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGuid)))))) { |
494 | 0 | FatalError("Error deserializing 'ScrollableLayerGuid'"); |
495 | 0 | return MsgValueError; |
496 | 0 | } |
497 | 0 | // Sentinel = 'aGuid' |
498 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) { |
499 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'"); |
500 | 0 | return MsgValueError; |
501 | 0 | } |
502 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aAnchorLocation)))))) { |
503 | 0 | FatalError("Error deserializing 'ScreenPoint'"); |
504 | 0 | return MsgValueError; |
505 | 0 | } |
506 | 0 | // Sentinel = 'aAnchorLocation' |
507 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4129679548)))) { |
508 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScreenPoint'"); |
509 | 0 | return MsgValueError; |
510 | 0 | } |
511 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
512 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
513 | 0 | FatalError("Transition error"); |
514 | 0 | return MsgValueError; |
515 | 0 | } |
516 | 0 | if ((!(RecvStartAutoscroll(aGuid, aAnchorLocation)))) { |
517 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
518 | 0 | // Error handled in mozilla::ipc::IPCResult |
519 | 0 | return MsgProcessingError; |
520 | 0 | } |
521 | 0 | |
522 | 0 | return MsgProcessed; |
523 | 0 | } |
524 | 0 | case PAPZCTreeManager::Msg_StopAutoscroll__ID: |
525 | 0 | { |
526 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
527 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
528 | 0 | } |
529 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_StopAutoscroll", OTHER); |
530 | 0 |
|
531 | 0 | PickleIterator iter__(msg__); |
532 | 0 | ScrollableLayerGuid aGuid; |
533 | 0 |
|
534 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGuid)))))) { |
535 | 0 | FatalError("Error deserializing 'ScrollableLayerGuid'"); |
536 | 0 | return MsgValueError; |
537 | 0 | } |
538 | 0 | // Sentinel = 'aGuid' |
539 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2369323719)))) { |
540 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScrollableLayerGuid'"); |
541 | 0 | return MsgValueError; |
542 | 0 | } |
543 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
544 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
545 | 0 | FatalError("Transition error"); |
546 | 0 | return MsgValueError; |
547 | 0 | } |
548 | 0 | if ((!(RecvStopAutoscroll(aGuid)))) { |
549 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
550 | 0 | // Error handled in mozilla::ipc::IPCResult |
551 | 0 | return MsgProcessingError; |
552 | 0 | } |
553 | 0 | |
554 | 0 | return MsgProcessed; |
555 | 0 | } |
556 | 0 | case PAPZCTreeManager::Msg_SetLongTapEnabled__ID: |
557 | 0 | { |
558 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
559 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
560 | 0 | } |
561 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg_SetLongTapEnabled", OTHER); |
562 | 0 |
|
563 | 0 | PickleIterator iter__(msg__); |
564 | 0 | bool aTapGestureEnabled; |
565 | 0 |
|
566 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aTapGestureEnabled)))))) { |
567 | 0 | FatalError("Error deserializing 'bool'"); |
568 | 0 | return MsgValueError; |
569 | 0 | } |
570 | 0 | // Sentinel = 'aTapGestureEnabled' |
571 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2978221422)))) { |
572 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
573 | 0 | return MsgValueError; |
574 | 0 | } |
575 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
576 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
577 | 0 | FatalError("Transition error"); |
578 | 0 | return MsgValueError; |
579 | 0 | } |
580 | 0 | if ((!(RecvSetLongTapEnabled(aTapGestureEnabled)))) { |
581 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
582 | 0 | // Error handled in mozilla::ipc::IPCResult |
583 | 0 | return MsgProcessingError; |
584 | 0 | } |
585 | 0 | |
586 | 0 | return MsgProcessed; |
587 | 0 | } |
588 | 0 | case PAPZCTreeManager::Msg___delete____ID: |
589 | 0 | { |
590 | 0 | if (mozilla::ipc::LoggingEnabledFor("PAPZCTreeManagerParent")) { |
591 | 0 | mozilla::ipc::LogMessageForProtocol("PAPZCTreeManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
592 | 0 | } |
593 | 0 | AUTO_PROFILER_LABEL("PAPZCTreeManager::Msg___delete__", OTHER); |
594 | 0 |
|
595 | 0 | PickleIterator iter__(msg__); |
596 | 0 | PAPZCTreeManagerParent* actor; |
597 | 0 |
|
598 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
599 | 0 | FatalError("Error deserializing 'PAPZCTreeManagerParent'"); |
600 | 0 | return MsgValueError; |
601 | 0 | } |
602 | 0 | if ((!((*((&(actor))))))) { |
603 | 0 | FatalError("Error deserializing 'PAPZCTreeManagerParent'"); |
604 | 0 | return MsgValueError; |
605 | 0 | } |
606 | 0 | // Sentinel = 'actor' |
607 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
608 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PAPZCTreeManagerParent'"); |
609 | 0 | return MsgValueError; |
610 | 0 | } |
611 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
612 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
613 | 0 | FatalError("Transition error"); |
614 | 0 | return MsgValueError; |
615 | 0 | } |
616 | 0 | if ((!(Recv__delete__()))) { |
617 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
618 | 0 | // Error handled in mozilla::ipc::IPCResult |
619 | 0 | return MsgProcessingError; |
620 | 0 | } |
621 | 0 | |
622 | 0 | |
623 | 0 | IProtocol* mgr = (actor)->Manager(); |
624 | 0 | (actor)->DestroySubtree(Deletion); |
625 | 0 | (actor)->DeallocSubtree(); |
626 | 0 | (mgr)->RemoveManagee(PAPZCTreeManagerMsgStart, actor); |
627 | 0 |
|
628 | 0 | return MsgProcessed; |
629 | 0 | } |
630 | 0 | default: |
631 | 0 | { |
632 | 0 | return MsgNotKnown; |
633 | 0 | } |
634 | 0 | } |
635 | 0 | } |
636 | | |
637 | | auto PAPZCTreeManagerParent::OnMessageReceived( |
638 | | const Message& msg__, |
639 | | Message*& reply__) -> PAPZCTreeManagerParent::Result |
640 | 0 | { |
641 | 0 | return MsgNotKnown; |
642 | 0 | } |
643 | | |
644 | | auto PAPZCTreeManagerParent::OnCallReceived( |
645 | | const Message& msg__, |
646 | | Message*& reply__) -> PAPZCTreeManagerParent::Result |
647 | 0 | { |
648 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
649 | 0 | return MsgNotKnown; |
650 | 0 | } |
651 | | |
652 | | auto PAPZCTreeManagerParent::GetProtocolTypeId() -> int32_t |
653 | 0 | { |
654 | 0 | return PAPZCTreeManagerMsgStart; |
655 | 0 | } |
656 | | |
657 | | auto PAPZCTreeManagerParent::DestroySubtree(ActorDestroyReason why) -> void |
658 | 0 | { |
659 | 0 | // Unregister from our manager. |
660 | 0 | Unregister(Id()); |
661 | 0 |
|
662 | 0 | // Reject owning pending responses. |
663 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
664 | 0 |
|
665 | 0 | // Finally, destroy "us". |
666 | 0 | ActorDestroy(why); |
667 | 0 | } |
668 | | |
669 | | auto PAPZCTreeManagerParent::DeallocSubtree() -> void |
670 | 0 | { |
671 | 0 | } |
672 | | |
673 | | |
674 | | |
675 | | } // namespace layers |
676 | | } // namespace mozilla |
677 | | namespace mozilla { |
678 | | namespace ipc { |
679 | | auto IPDLParamTraits<mozilla::layers::PAPZCTreeManagerParent>::Write( |
680 | | IPC::Message* aMsg, |
681 | | mozilla::ipc::IProtocol* aActor, |
682 | | const paramType& aVar) -> void |
683 | 0 | { |
684 | 0 | int32_t id; |
685 | 0 | if ((!(aVar))) { |
686 | 0 | id = 0; |
687 | 0 | } |
688 | 0 | else { |
689 | 0 | id = (aVar)->Id(); |
690 | 0 | if ((1) == (id)) { |
691 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
692 | 0 | } |
693 | 0 | } |
694 | 0 | WriteIPDLParam(aMsg, aActor, id); |
695 | 0 | } |
696 | | |
697 | | auto IPDLParamTraits<mozilla::layers::PAPZCTreeManagerParent>::Read( |
698 | | const IPC::Message* aMsg, |
699 | | PickleIterator* aIter, |
700 | | mozilla::ipc::IProtocol* aActor, |
701 | | paramType* aVar) -> bool |
702 | 0 | { |
703 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PAPZCTreeManager", PAPZCTreeManagerMsgStart); |
704 | 0 | if ((actor).isNothing()) { |
705 | 0 | return false; |
706 | 0 | } |
707 | 0 | |
708 | 0 | (*(aVar)) = static_cast<mozilla::layers::PAPZCTreeManagerParent*>((actor).value()); |
709 | 0 | return true; |
710 | 0 | } |
711 | | |
712 | | } // namespace ipc |
713 | | } // namespace mozilla |