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