Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/widget/PCompositorWidgetParent.h"
8 :
9 : #include "mozilla/layers/PCompositorBridgeParent.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace widget {
16 :
17 :
18 0 : auto PCompositorWidgetParent::Recv__delete__() -> mozilla::ipc::IPCResult
19 : {
20 0 : return IPC_OK();
21 : }
22 :
23 :
24 0 : MOZ_IMPLICIT PCompositorWidgetParent::PCompositorWidgetParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PCompositorWidget::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PCompositorWidgetParent);
29 0 : }
30 :
31 0 : PCompositorWidgetParent::~PCompositorWidgetParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PCompositorWidgetParent);
34 0 : }
35 :
36 0 : auto PCompositorWidgetParent::Manager() const -> PCompositorBridgeParent*
37 : {
38 0 : return static_cast<PCompositorBridgeParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PCompositorWidgetParent::SendObserveVsync() -> bool
42 : {
43 0 : IPC::Message* msg__ = PCompositorWidget::Msg_ObserveVsync(Id());
44 :
45 :
46 :
47 :
48 :
49 0 : if (mozilla::ipc::LoggingEnabledFor("PCompositorWidgetParent")) {
50 0 : mozilla::ipc::LogMessageForProtocol("PCompositorWidgetParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
51 : }
52 0 : AUTO_PROFILER_LABEL("PCompositorWidget::Msg_ObserveVsync", OTHER);
53 0 : PCompositorWidget::Transition(PCompositorWidget::Msg_ObserveVsync__ID, (&(mState)));
54 :
55 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
56 0 : return sendok__;
57 : }
58 :
59 0 : auto PCompositorWidgetParent::SendUnobserveVsync() -> bool
60 : {
61 0 : IPC::Message* msg__ = PCompositorWidget::Msg_UnobserveVsync(Id());
62 :
63 :
64 :
65 :
66 :
67 0 : if (mozilla::ipc::LoggingEnabledFor("PCompositorWidgetParent")) {
68 0 : mozilla::ipc::LogMessageForProtocol("PCompositorWidgetParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
69 : }
70 0 : AUTO_PROFILER_LABEL("PCompositorWidget::Msg_UnobserveVsync", OTHER);
71 0 : PCompositorWidget::Transition(PCompositorWidget::Msg_UnobserveVsync__ID, (&(mState)));
72 :
73 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
74 0 : return sendok__;
75 : }
76 :
77 0 : auto PCompositorWidgetParent::RemoveManagee(
78 : int32_t aProtocolId,
79 : ProtocolBase* aListener) -> void
80 : {
81 0 : FatalError("unreached");
82 0 : return;
83 : }
84 :
85 0 : auto PCompositorWidgetParent::OnMessageReceived(const Message& msg__) -> PCompositorWidgetParent::Result
86 : {
87 0 : switch ((msg__).type()) {
88 : case PCompositorWidget::Msg___delete____ID:
89 : {
90 0 : if (mozilla::ipc::LoggingEnabledFor("PCompositorWidgetParent")) {
91 0 : mozilla::ipc::LogMessageForProtocol("PCompositorWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
92 : }
93 0 : AUTO_PROFILER_LABEL("PCompositorWidget::Msg___delete__", OTHER);
94 :
95 0 : PickleIterator iter__(msg__);
96 : PCompositorWidgetParent* actor;
97 :
98 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
99 0 : FatalError("Error deserializing 'PCompositorWidgetParent'");
100 0 : return MsgValueError;
101 : }
102 : // Sentinel = 'actor'
103 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
104 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PCompositorWidgetParent'");
105 0 : return MsgValueError;
106 : }
107 0 : (msg__).EndRead(iter__, (msg__).type());
108 0 : PCompositorWidget::Transition(PCompositorWidget::Msg___delete____ID, (&(mState)));
109 0 : if ((!(Recv__delete__()))) {
110 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
111 : // Error handled in mozilla::ipc::IPCResult
112 0 : return MsgProcessingError;
113 : }
114 :
115 :
116 0 : IProtocol* mgr = (actor)->Manager();
117 0 : (actor)->DestroySubtree(Deletion);
118 0 : (actor)->DeallocSubtree();
119 0 : (mgr)->RemoveManagee(PCompositorWidgetMsgStart, actor);
120 :
121 0 : return MsgProcessed;
122 : }
123 : case PCompositorWidget::Msg_NotifyClientSizeChanged__ID:
124 : {
125 0 : if (mozilla::ipc::LoggingEnabledFor("PCompositorWidgetParent")) {
126 0 : mozilla::ipc::LogMessageForProtocol("PCompositorWidgetParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
127 : }
128 0 : AUTO_PROFILER_LABEL("PCompositorWidget::Msg_NotifyClientSizeChanged", OTHER);
129 :
130 0 : PickleIterator iter__(msg__);
131 0 : LayoutDeviceIntSize aClientSize;
132 :
133 0 : if ((!(Read((&(aClientSize)), (&(msg__)), (&(iter__)))))) {
134 0 : FatalError("Error deserializing 'LayoutDeviceIntSize'");
135 0 : return MsgValueError;
136 : }
137 : // Sentinel = 'aClientSize'
138 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3895995060)))) {
139 0 : mozilla::ipc::SentinelReadError("Error deserializing 'LayoutDeviceIntSize'");
140 0 : return MsgValueError;
141 : }
142 0 : (msg__).EndRead(iter__, (msg__).type());
143 0 : PCompositorWidget::Transition(PCompositorWidget::Msg_NotifyClientSizeChanged__ID, (&(mState)));
144 0 : if ((!(RecvNotifyClientSizeChanged(mozilla::Move(aClientSize))))) {
145 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
146 : // Error handled in mozilla::ipc::IPCResult
147 0 : return MsgProcessingError;
148 : }
149 :
150 0 : return MsgProcessed;
151 : }
152 : default:
153 : {
154 0 : return MsgNotKnown;
155 : }
156 : }
157 : }
158 :
159 0 : auto PCompositorWidgetParent::OnMessageReceived(
160 : const Message& msg__,
161 : Message*& reply__) -> PCompositorWidgetParent::Result
162 : {
163 0 : return MsgNotKnown;
164 : }
165 :
166 0 : auto PCompositorWidgetParent::OnCallReceived(
167 : const Message& msg__,
168 : Message*& reply__) -> PCompositorWidgetParent::Result
169 : {
170 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
171 : return MsgNotKnown;
172 : }
173 :
174 0 : auto PCompositorWidgetParent::GetProtocolTypeId() -> int32_t
175 : {
176 0 : return PCompositorWidgetMsgStart;
177 : }
178 :
179 0 : auto PCompositorWidgetParent::ProtocolName() const -> const char*
180 : {
181 0 : return "PCompositorWidgetParent";
182 : }
183 :
184 0 : auto PCompositorWidgetParent::DestroySubtree(ActorDestroyReason why) -> void
185 : {
186 : // Unregister from our manager.
187 0 : Unregister(Id());
188 :
189 : // Reject owning pending promises.
190 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
191 :
192 : // Finally, destroy "us".
193 0 : ActorDestroy(why);
194 0 : }
195 :
196 0 : auto PCompositorWidgetParent::DeallocSubtree() -> void
197 : {
198 0 : }
199 :
200 0 : auto PCompositorWidgetParent::Write(
201 : const PCompositorWidgetParent* v__,
202 : Message* msg__,
203 : bool nullable__) -> void
204 : {
205 : int32_t id;
206 0 : if ((!(v__))) {
207 0 : if ((!(nullable__))) {
208 0 : FatalError("NULL actor value passed to non-nullable param");
209 : }
210 0 : id = 0;
211 : }
212 : else {
213 0 : id = (v__)->Id();
214 0 : if ((1) == (id)) {
215 0 : FatalError("actor has been |delete|d");
216 : }
217 : }
218 :
219 0 : Write(id, msg__);
220 0 : }
221 :
222 0 : auto PCompositorWidgetParent::Read(
223 : PCompositorWidgetParent** v__,
224 : const Message* msg__,
225 : PickleIterator* iter__,
226 : bool nullable__) -> bool
227 : {
228 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PCompositorWidget", PCompositorWidgetMsgStart);
229 0 : if ((actor).isNothing()) {
230 0 : return false;
231 : }
232 :
233 0 : (*(v__)) = static_cast<PCompositorWidgetParent*>((actor).value());
234 0 : return true;
235 : }
236 :
237 :
238 :
239 : } // namespace widget
240 : } // namespace mozilla
|