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