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