Bug 1707290 [wpt PR 28671] - Auto-expand details elements for find-in-page, a=testonly
[gecko.git] / dom / network / TCPServerSocketParent.h
blobe049da5f6ffd1f27a415fdb6ac20457e24704696
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_TCPServerSocketParent_h
8 #define mozilla_dom_TCPServerSocketParent_h
10 #include "mozilla/net/PNeckoParent.h"
11 #include "mozilla/net/PTCPServerSocketParent.h"
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsCOMPtr.h"
15 namespace mozilla {
16 namespace dom {
18 class TCPServerSocket;
19 class TCPServerSocketEvent;
20 class TCPSocketParent;
22 class TCPServerSocketParent : public mozilla::net::PTCPServerSocketParent,
23 public nsISupports {
24 public:
25 NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketParent)
26 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
28 TCPServerSocketParent(PNeckoParent* neckoParent, uint16_t aLocalPort,
29 uint16_t aBacklog, bool aUseArrayBuffers);
31 void Init();
33 mozilla::ipc::IPCResult RecvClose();
34 mozilla::ipc::IPCResult RecvRequestDelete();
36 void AddIPDLReference();
37 void ReleaseIPDLReference();
39 void OnConnect(TCPServerSocketEvent* event);
41 private:
42 ~TCPServerSocketParent();
44 nsresult SendCallbackAccept(TCPSocketParent* socket);
46 virtual void ActorDestroy(ActorDestroyReason why) override;
48 PNeckoParent* mNeckoParent;
49 RefPtr<TCPServerSocket> mServerSocket;
50 bool mIPCOpen;
53 } // namespace dom
54 } // namespace mozilla
56 #endif // mozilla_dom_TCPServerSocketParent_h