2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsExternalProtocolHandler_h___
|
|
|
|
#define nsExternalProtocolHandler_h___
|
|
|
|
|
|
|
|
#include "nsIExternalProtocolHandler.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsWeakReference.h"
|
|
|
|
#include "nsIExternalProtocolService.h"
|
2012-06-12 20:53:09 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIURI;
|
|
|
|
|
|
|
|
// protocol handlers need to support weak references if we want the netlib nsIOService to cache them.
|
2015-03-21 09:28:04 -07:00
|
|
|
class nsExternalProtocolHandler final : public nsIExternalProtocolHandler, public nsSupportsWeakReference
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2013-07-18 19:24:15 -07:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_DECL_NSIPROTOCOLHANDLER
|
|
|
|
NS_DECL_NSIEXTERNALPROTOCOLHANDLER
|
|
|
|
|
|
|
|
nsExternalProtocolHandler();
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 11:49:09 -07:00
|
|
|
~nsExternalProtocolHandler();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// helper function
|
2011-09-28 23:19:26 -07:00
|
|
|
bool HaveExternalProtocolHandler(nsIURI * aURI);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCString m_schemeName;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsExternalProtocolHandler_h___
|
|
|
|
|