author Josh Matthews <>
Wed, 12 Dec 2012 10:40:33 -0500
changeset 125815 6fe383b92b05fd5e6134f207c04ecf2045f301ee
parent 125299 463b740c3e2f77925dc48a47979bcf9fa5d27bba
child 125958 81f530168b395aa43b087fafcf65a801f8135430
permissions -rw-r--r--
Bug 782542 - Secure necko IPDL usage. r=ted,jduell

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

#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
  virtual ~NeckoChild();

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

  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(PBrowserChild* aBrowser,
                                             const SerializedLoadContext& aSerialized);
  virtual bool DeallocPFTPChannel(PFTPChannelChild*);
  virtual PWebSocketChild* AllocPWebSocket(PBrowserChild*, const SerializedLoadContext&);
  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