|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set sw=2 ts=8 et tw=80 : */ |
|
3 |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 #ifndef mozilla_net_NeckoChild_h |
|
9 #define mozilla_net_NeckoChild_h |
|
10 |
|
11 #include "mozilla/net/PNeckoChild.h" |
|
12 #include "mozilla/net/NeckoCommon.h" |
|
13 |
|
14 namespace mozilla { |
|
15 namespace net { |
|
16 |
|
17 // Header file contents |
|
18 class NeckoChild : |
|
19 public PNeckoChild |
|
20 { |
|
21 public: |
|
22 NeckoChild(); |
|
23 virtual ~NeckoChild(); |
|
24 |
|
25 static void InitNeckoChild(); |
|
26 static void DestroyNeckoChild(); |
|
27 |
|
28 protected: |
|
29 virtual PHttpChannelChild* |
|
30 AllocPHttpChannelChild(PBrowserChild*, const SerializedLoadContext&, |
|
31 const HttpChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; |
|
32 virtual bool DeallocPHttpChannelChild(PHttpChannelChild*) MOZ_OVERRIDE; |
|
33 virtual PCookieServiceChild* AllocPCookieServiceChild() MOZ_OVERRIDE; |
|
34 virtual bool DeallocPCookieServiceChild(PCookieServiceChild*) MOZ_OVERRIDE; |
|
35 virtual PWyciwygChannelChild* AllocPWyciwygChannelChild() MOZ_OVERRIDE; |
|
36 virtual bool DeallocPWyciwygChannelChild(PWyciwygChannelChild*) MOZ_OVERRIDE; |
|
37 virtual PFTPChannelChild* |
|
38 AllocPFTPChannelChild(PBrowserChild* aBrowser, |
|
39 const SerializedLoadContext& aSerialized, |
|
40 const FTPChannelCreationArgs& aOpenArgs) MOZ_OVERRIDE; |
|
41 virtual bool DeallocPFTPChannelChild(PFTPChannelChild*) MOZ_OVERRIDE; |
|
42 virtual PWebSocketChild* |
|
43 AllocPWebSocketChild(PBrowserChild*, const SerializedLoadContext&) MOZ_OVERRIDE; |
|
44 virtual bool DeallocPWebSocketChild(PWebSocketChild*) MOZ_OVERRIDE; |
|
45 virtual PTCPSocketChild* AllocPTCPSocketChild() MOZ_OVERRIDE; |
|
46 virtual bool DeallocPTCPSocketChild(PTCPSocketChild*) MOZ_OVERRIDE; |
|
47 virtual PTCPServerSocketChild* |
|
48 AllocPTCPServerSocketChild(const uint16_t& aLocalPort, |
|
49 const uint16_t& aBacklog, |
|
50 const nsString& aBinaryType) MOZ_OVERRIDE; |
|
51 virtual bool DeallocPTCPServerSocketChild(PTCPServerSocketChild*) MOZ_OVERRIDE; |
|
52 virtual PUDPSocketChild* AllocPUDPSocketChild(const nsCString& aHost, |
|
53 const uint16_t& aPort, |
|
54 const nsCString& aFilter) MOZ_OVERRIDE; |
|
55 virtual bool DeallocPUDPSocketChild(PUDPSocketChild*) MOZ_OVERRIDE; |
|
56 virtual PDNSRequestChild* AllocPDNSRequestChild(const nsCString& aHost, |
|
57 const uint32_t& aFlags) MOZ_OVERRIDE; |
|
58 virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) MOZ_OVERRIDE; |
|
59 virtual PRemoteOpenFileChild* |
|
60 AllocPRemoteOpenFileChild(const URIParams&, |
|
61 const OptionalURIParams&) MOZ_OVERRIDE; |
|
62 virtual bool DeallocPRemoteOpenFileChild(PRemoteOpenFileChild*) MOZ_OVERRIDE; |
|
63 virtual PRtspControllerChild* AllocPRtspControllerChild() MOZ_OVERRIDE; |
|
64 virtual bool DeallocPRtspControllerChild(PRtspControllerChild*) MOZ_OVERRIDE; |
|
65 virtual PRtspChannelChild* |
|
66 AllocPRtspChannelChild(const RtspChannelConnectArgs& aArgs) |
|
67 MOZ_OVERRIDE; |
|
68 virtual bool DeallocPRtspChannelChild(PRtspChannelChild*) MOZ_OVERRIDE; |
|
69 virtual PChannelDiverterChild* |
|
70 AllocPChannelDiverterChild(const ChannelDiverterArgs& channel) MOZ_OVERRIDE; |
|
71 virtual bool |
|
72 DeallocPChannelDiverterChild(PChannelDiverterChild* actor) MOZ_OVERRIDE; |
|
73 }; |
|
74 |
|
75 /** |
|
76 * Reference to the PNecko Child protocol. |
|
77 * Null if this is not a content process. |
|
78 */ |
|
79 extern PNeckoChild *gNeckoChild; |
|
80 |
|
81 } // namespace net |
|
82 } // namespace mozilla |
|
83 |
|
84 #endif // mozilla_net_NeckoChild_h |