Bug 1879774 [wpt PR 44524] - WebKit export: Implement field-sizing support for input...
[gecko.git] / netwerk / protocol / gio / nsGIOProtocolHandler.h
blob08e7c01beda62a12b0077fed38f77a7177b49785
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,
17 public nsIObserver {
18 public:
19 NS_DECL_ISUPPORTS
20 NS_DECL_NSIPROTOCOLHANDLER
21 NS_DECL_NSIOBSERVER
23 static already_AddRefed<nsGIOProtocolHandler> GetSingleton();
24 bool IsSupportedProtocol(const nsCString& aScheme);
26 protected:
27 ~nsGIOProtocolHandler() = default;
29 private:
30 nsresult Init();
32 void InitSupportedProtocolsPref(nsIPrefBranch* prefs);
34 static mozilla::StaticRefPtr<nsGIOProtocolHandler> sSingleton;
35 nsTArray<nsCString> mSupportedProtocols;
38 #endif // nsGIOProtocolHandler_h___