Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/plugins/PPluginSurfaceChild.h"
8 :
9 : #include "mozilla/plugins/PPluginInstanceChild.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace plugins {
16 :
17 :
18 0 : auto PPluginSurfaceChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19 : {
20 0 : }
21 :
22 0 : MOZ_IMPLICIT PPluginSurfaceChild::PPluginSurfaceChild() :
23 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24 0 : mState(PPluginSurface::__Dead)
25 : {
26 0 : MOZ_COUNT_CTOR(PPluginSurfaceChild);
27 0 : }
28 :
29 0 : PPluginSurfaceChild::~PPluginSurfaceChild()
30 : {
31 0 : MOZ_COUNT_DTOR(PPluginSurfaceChild);
32 0 : }
33 :
34 0 : auto PPluginSurfaceChild::Manager() const -> PPluginInstanceChild*
35 : {
36 0 : return static_cast<PPluginInstanceChild*>(IProtocol::Manager());
37 : }
38 :
39 0 : auto PPluginSurfaceChild::Send__delete__(PPluginSurfaceChild* actor) -> bool
40 : {
41 0 : if ((!(actor))) {
42 0 : return false;
43 : }
44 :
45 0 : IPC::Message* msg__ = PPluginSurface::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("PPluginSurfaceChild")) {
54 0 : mozilla::ipc::LogMessageForProtocol("PPluginSurfaceChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
55 : }
56 0 : AUTO_PROFILER_LABEL("PPluginSurface::Msg___delete__", OTHER);
57 0 : PPluginSurface::Transition(PPluginSurface::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(PPluginSurfaceMsgStart, actor);
65 0 : return sendok__;
66 : }
67 :
68 0 : auto PPluginSurfaceChild::RemoveManagee(
69 : int32_t aProtocolId,
70 : ProtocolBase* aListener) -> void
71 : {
72 0 : FatalError("unreached");
73 0 : return;
74 : }
75 :
76 0 : auto PPluginSurfaceChild::OnMessageReceived(const Message& msg__) -> PPluginSurfaceChild::Result
77 : {
78 0 : switch ((msg__).type()) {
79 : case PPluginSurface::Reply___delete____ID:
80 : {
81 0 : return MsgProcessed;
82 : }
83 : default:
84 : {
85 0 : return MsgNotKnown;
86 : }
87 : }
88 : }
89 :
90 0 : auto PPluginSurfaceChild::OnMessageReceived(
91 : const Message& msg__,
92 : Message*& reply__) -> PPluginSurfaceChild::Result
93 : {
94 0 : return MsgNotKnown;
95 : }
96 :
97 0 : auto PPluginSurfaceChild::OnCallReceived(
98 : const Message& msg__,
99 : Message*& reply__) -> PPluginSurfaceChild::Result
100 : {
101 0 : return MsgNotKnown;
102 : }
103 :
104 0 : auto PPluginSurfaceChild::GetProtocolTypeId() -> int32_t
105 : {
106 0 : return PPluginSurfaceMsgStart;
107 : }
108 :
109 0 : auto PPluginSurfaceChild::ProtocolName() const -> const char*
110 : {
111 0 : return "PPluginSurfaceChild";
112 : }
113 :
114 0 : auto PPluginSurfaceChild::DestroySubtree(ActorDestroyReason why) -> void
115 : {
116 : // Unregister from our manager.
117 0 : Unregister(Id());
118 :
119 : // Reject owning pending promises.
120 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
121 :
122 : // Finally, destroy "us".
123 0 : ActorDestroy(why);
124 0 : }
125 :
126 0 : auto PPluginSurfaceChild::DeallocSubtree() -> void
127 : {
128 0 : }
129 :
130 0 : auto PPluginSurfaceChild::Write(
131 : const PPluginSurfaceChild* v__,
132 : Message* msg__,
133 : bool nullable__) -> void
134 : {
135 : int32_t id;
136 0 : if ((!(v__))) {
137 0 : if ((!(nullable__))) {
138 0 : FatalError("NULL actor value passed to non-nullable param");
139 : }
140 0 : id = 0;
141 : }
142 : else {
143 0 : id = (v__)->Id();
144 0 : if ((1) == (id)) {
145 0 : FatalError("actor has been |delete|d");
146 : }
147 : }
148 :
149 0 : Write(id, msg__);
150 0 : }
151 :
152 0 : auto PPluginSurfaceChild::Read(
153 : PPluginSurfaceChild** v__,
154 : const Message* msg__,
155 : PickleIterator* iter__,
156 : bool nullable__) -> bool
157 : {
158 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PPluginSurface", PPluginSurfaceMsgStart);
159 0 : if ((actor).isNothing()) {
160 0 : return false;
161 : }
162 :
163 0 : (*(v__)) = static_cast<PPluginSurfaceChild*>((actor).value());
164 0 : return true;
165 : }
166 :
167 :
168 :
169 : } // namespace plugins
170 : } // namespace mozilla
|