uriloader/exthandler/nsExternalProtocolHandler.h
author Nicholas Cameron <ncameron@mozilla.com>
Mon, 28 May 2012 21:10:08 -0400
changeset 99193 9cc3b4fc60c545be2f7060cbcc192eff26727cbd
parent 98529 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 101348 4142308ec401baf9504115c3492fd698f2c99a4f
child 112525 80e4ab0d24bc64ceaa7693ab5def36faffde7a40
permissions -rw-r--r--
Bug 758561 - Don't build a mask for an empty layer. r=roc

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * 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 nsExternalProtocolHandler_h___
#define nsExternalProtocolHandler_h___

#include "nsIExternalProtocolHandler.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsWeakReference.h"
#include "nsIExternalProtocolService.h"

class nsIURI;

// protocol handlers need to support weak references if we want the netlib nsIOService to cache them.
class nsExternalProtocolHandler : public nsIExternalProtocolHandler, public nsSupportsWeakReference
{
public:
	NS_DECL_ISUPPORTS
	NS_DECL_NSIPROTOCOLHANDLER
	NS_DECL_NSIEXTERNALPROTOCOLHANDLER

	nsExternalProtocolHandler();
	~nsExternalProtocolHandler();

protected:
  // helper function
  bool HaveExternalProtocolHandler(nsIURI * aURI);
	nsCString	m_schemeName;
};

#endif // nsExternalProtocolHandler_h___