gecko-dev/dom/network/TCPServerSocketParent.h
Phil Ringnalda 53a5e2bb9c Back out 3 changesets (bug 885982, bug 1118063) for b2g mochitest-6 bustage
CLOSED TREE

Backed out changeset 865e7bc208df (bug 885982)
Backed out changeset 9ede577f5ada (bug 885982)
Backed out changeset 6ccc86f7429e (bug 1118063)

--HG--
rename : dom/network/interfaces/nsITCPServerSocketInternal.idl => dom/network/interfaces/nsIDOMTCPServerSocket.idl
2015-01-17 13:26:10 -08:00

53 lines
1.5 KiB
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/net/PNeckoParent.h"
#include "mozilla/net/PTCPServerSocketParent.h"
#include "nsITCPSocketParent.h"
#include "nsITCPServerSocketParent.h"
#include "nsCycleCollectionParticipant.h"
#include "nsCOMPtr.h"
#include "nsIDOMTCPSocket.h"
namespace mozilla {
namespace dom {
class PBrowserParent;
class TCPServerSocketParent : public mozilla::net::PTCPServerSocketParent
, public nsITCPServerSocketParent
{
public:
NS_DECL_CYCLE_COLLECTION_CLASS(TCPServerSocketParent)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSITCPSERVERSOCKETPARENT
TCPServerSocketParent() : mNeckoParent(nullptr), mIPCOpen(false) {}
bool Init(PNeckoParent* neckoParent, const uint16_t& aLocalPort, const uint16_t& aBacklog,
const nsString& aBinaryType);
virtual bool RecvClose() MOZ_OVERRIDE;
virtual bool RecvRequestDelete() MOZ_OVERRIDE;
uint32_t GetAppId();
bool GetInBrowser();
void AddIPDLReference();
void ReleaseIPDLReference();
private:
~TCPServerSocketParent() {}
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
PNeckoParent* mNeckoParent;
nsCOMPtr<nsITCPSocketIntermediary> mIntermediary;
nsCOMPtr<nsIDOMTCPServerSocket> mServerSocket;
bool mIPCOpen;
};
} // namespace dom
} // namespace mozilla