netwerk/ipc/NeckoChild.h
author Kyle Machulis <kyle@nonpolynomial.com>
Wed, 10 Oct 2012 22:48:40 -0700
changeset 113348 e47353b30f18e46b660158753be885b2526410c5
parent 113283 2217b510b28a9ec9e8c3685cb19fd21561da6f24
child 119021 e1d28c3dc1aac6932c24e66fe76a0c910dea26db
permissions -rw-r--r--
Bug 796176 - Patch 1: UnixSocket changes to get connect/listen running main thread, connect status to consumers. r=cjones, a=blocking-basecamp

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et tw=80 : */

/* 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/. */

#ifndef mozilla_net_NeckoChild_h
#define mozilla_net_NeckoChild_h

#include "mozilla/net/PNeckoChild.h"
#include "mozilla/net/NeckoCommon.h"

namespace mozilla {
namespace net {

// Header file contents
class NeckoChild :
  public PNeckoChild
{
public:
  NeckoChild();
  virtual ~NeckoChild();

  static void InitNeckoChild();
  static void DestroyNeckoChild();

protected:
  virtual PHttpChannelChild* AllocPHttpChannel(PBrowserChild*,
                                              const SerializedLoadContext&);
  virtual bool DeallocPHttpChannel(PHttpChannelChild*);
  virtual PCookieServiceChild* AllocPCookieService();
  virtual bool DeallocPCookieService(PCookieServiceChild*);
  virtual PWyciwygChannelChild* AllocPWyciwygChannel();
  virtual bool DeallocPWyciwygChannel(PWyciwygChannelChild*);
  virtual PFTPChannelChild* AllocPFTPChannel();
  virtual bool DeallocPFTPChannel(PFTPChannelChild*);
  virtual PWebSocketChild* AllocPWebSocket(PBrowserChild*);
  virtual bool DeallocPWebSocket(PWebSocketChild*);
  virtual PTCPSocketChild* AllocPTCPSocket(const nsString& aHost,
                                           const uint16_t& aPort,
                                           const bool& useSSL,
                                           const nsString& aBinaryType,
                                           PBrowserChild* aBrowser);
  virtual bool DeallocPTCPSocket(PTCPSocketChild*);
};

/**
 * Reference to the PNecko Child protocol.
 * Null if this is not a content process.
 */
extern PNeckoChild *gNeckoChild;

} // namespace net
} // namespace mozilla

#endif // mozilla_net_NeckoChild_h