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