1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PPluginSurfaceChild_h
7 : #define PPluginSurfaceChild_h
8 :
9 : #include "mozilla/plugins/PPluginSurface.h"
10 : namespace mozilla {
11 : namespace plugins {
12 : class PPluginInstanceChild;
13 : } // namespace plugins
14 : } // namespace mozilla
15 :
16 : #ifdef DEBUG
17 : #include "prenv.h"
18 : #endif // DEBUG
19 : #include "base/id_map.h"
20 : #include "mozilla/ipc/RPCChannel.h"
21 :
22 :
23 : namespace mozilla {
24 : namespace plugins {
25 : class PPluginInstanceChild;
26 : } // namespace plugins
27 : } // namespace mozilla
28 :
29 : namespace mozilla {
30 : namespace plugins {
31 :
32 :
33 : class /*NS_ABSTRACT_CLASS*/ PPluginSurfaceChild :
34 : protected mozilla::ipc::RPCChannel::RPCListener,
35 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
36 : {
37 : friend class mozilla::plugins::PPluginInstanceChild;
38 :
39 : protected:
40 : typedef mozilla::ipc::ActorHandle ActorHandle;
41 : typedef mozilla::ipc::Shmem Shmem;
42 : typedef mozilla::plugins::PPluginInstanceChild PPluginInstanceChild;
43 : typedef base::ProcessId ProcessId;
44 : typedef mozilla::ipc::ProtocolId ProtocolId;
45 : typedef mozilla::ipc::Transport Transport;
46 : typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
47 :
48 : typedef PPluginSurface::State State;
49 :
50 :
51 : virtual void
52 : ActorDestroy(ActorDestroyReason why);
53 :
54 : public:
55 : typedef IPC::Message Message;
56 : typedef mozilla::ipc::RPCChannel Channel;
57 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
58 : typedef base::ProcessHandle ProcessHandle;
59 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
60 : typedef mozilla::ipc::SharedMemory SharedMemory;
61 : typedef mozilla::ipc::Trigger Trigger;
62 :
63 : public:
64 : PPluginSurfaceChild();
65 :
66 : virtual ~PPluginSurfaceChild();
67 :
68 : PPluginInstanceChild*
69 : Manager();
70 :
71 : PPluginSurface::State
72 : state();
73 :
74 : static bool
75 : Send__delete__(PPluginSurfaceChild* actor);
76 :
77 : virtual int32
78 : Register(ChannelListener* aRouted);
79 : virtual int32
80 : RegisterID(
81 : ChannelListener* aRouted,
82 : int32 aId);
83 : virtual ChannelListener*
84 : Lookup(int32 aId);
85 : virtual void
86 : Unregister(int32 aId);
87 : virtual void
88 : RemoveManagee(
89 : int32 aProtocolId,
90 : ChannelListener* aListener);
91 : virtual Shmem::SharedMemory*
92 : CreateSharedMemory(
93 : size_t aSize,
94 : Shmem::SharedMemory::SharedMemoryType type,
95 : bool unsafe,
96 : Shmem::id_t* aId);
97 : virtual bool
98 : AdoptSharedMemory(
99 : Shmem::SharedMemory* segment,
100 : Shmem::id_t* aId);
101 : virtual Shmem::SharedMemory*
102 : LookupSharedMemory(Shmem::id_t aId);
103 : virtual bool
104 : IsTrackingSharedMemory(Shmem::SharedMemory* segment);
105 : virtual bool
106 : DestroySharedMemory(Shmem& aShmem);
107 : virtual ProcessHandle
108 : OtherProcess() const;
109 : virtual AsyncChannel*
110 : GetIPCChannel();
111 :
112 : virtual Result
113 : OnMessageReceived(const Message& __msg);
114 :
115 : virtual Result
116 : OnMessageReceived(
117 : const Message& __msg,
118 : Message*& __reply);
119 :
120 : virtual Result
121 : OnCallReceived(
122 : const Message& __msg,
123 : Message*& __reply);
124 :
125 : void
126 : OnProcessingError(Result code);
127 :
128 : bool
129 : OnReplyTimeout();
130 :
131 : void
132 : OnChannelClose();
133 :
134 : void
135 : OnChannelError();
136 :
137 : void
138 : OnChannelConnected(int32 pid);
139 :
140 : // Methods for managing shmem
141 : bool
142 : AllocShmem(
143 : size_t aSize,
144 : Shmem::SharedMemory::SharedMemoryType aType,
145 : Shmem* aMem);
146 :
147 : bool
148 : AllocUnsafeShmem(
149 : size_t aSize,
150 : Shmem::SharedMemory::SharedMemoryType aType,
151 : Shmem* aMem);
152 :
153 : bool
154 : AdoptShmem(
155 : Shmem& aMem,
156 : Shmem* aOutMem);
157 :
158 : bool
159 : DeallocShmem(Shmem& aMem);
160 :
161 : private:
162 : virtual void
163 : FatalError(const char* const msg) const;
164 :
165 : void
166 : DestroySubtree(ActorDestroyReason why);
167 :
168 : void
169 : DeallocSubtree();
170 :
171 : template<typename T>
172 : void
173 0 : Write(
174 : const T& __v,
175 : Message* __msg)
176 : {
177 0 : IPC::WriteParam(__msg, __v);
178 0 : }
179 :
180 : template<typename T>
181 : bool
182 0 : Read(
183 : T* __v,
184 : const Message* __msg,
185 : void** __iter)
186 : {
187 0 : return IPC::ReadParam(__msg, __iter, __v);
188 : }
189 :
190 : void
191 : Write(
192 : PPluginSurfaceChild* __v,
193 : Message* __msg,
194 : bool __nullable);
195 :
196 : bool
197 : Read(
198 : PPluginSurfaceChild** __v,
199 : const Message* __msg,
200 : void** __iter,
201 : bool __nullable) NS_WARN_UNUSED_RESULT;
202 :
203 : Channel* mChannel;
204 : int32 mId;
205 : mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
206 : State mState;
207 : };
208 :
209 :
210 : } // namespace plugins
211 : } // namespace mozilla
212 :
213 : #if 0
214 :
215 : //-----------------------------------------------------------------------------
216 : // Skeleton implementation of abstract actor class
217 :
218 : // Header file contents
219 : namespace mozilla {
220 : namespace plugins {
221 : class PluginSurfaceChild :
222 : public PPluginSurfaceChild
223 : {
224 : PluginSurfaceChild();
225 : virtual ~PluginSurfaceChild();
226 : };
227 : } // namespace plugins
228 : } // namespace mozilla
229 :
230 :
231 : // C++ file contents
232 : namespace mozilla {
233 : namespace plugins {
234 : PluginSurfaceChild::PluginSurfaceChild()
235 : {
236 : MOZ_COUNT_CTOR(PluginSurfaceChild);
237 : }
238 :
239 : PluginSurfaceChild::~PluginSurfaceChild()
240 : {
241 : MOZ_COUNT_DTOR(PluginSurfaceChild);
242 : }
243 :
244 : } // namespace plugins
245 : } // namespace mozilla
246 : #endif // if 0
247 :
248 : #endif // ifndef PPluginSurfaceChild_h
|