1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsGIOProtocolHandler_h___
6 #define nsGIOProtocolHandler_h___
8 #include "nsIProtocolHandler.h"
9 #include "nsIObserver.h"
10 #include "nsIPrefBranch.h"
11 #include "nsStringFwd.h"
13 #include "mozilla/Logging.h"
14 extern mozilla::LazyLogModule gGIOLog
;
16 class nsGIOProtocolHandler final
: public nsIProtocolHandler
,
20 NS_DECL_NSIPROTOCOLHANDLER
23 static already_AddRefed
<nsGIOProtocolHandler
> GetSingleton();
24 bool IsSupportedProtocol(const nsCString
& aScheme
);
27 ~nsGIOProtocolHandler() = default;
32 void InitSupportedProtocolsPref(nsIPrefBranch
* prefs
);
34 static mozilla::StaticRefPtr
<nsGIOProtocolHandler
> sSingleton
;
35 nsTArray
<nsCString
> mSupportedProtocols
;
38 #endif // nsGIOProtocolHandler_h___