#pragma once
#include <wtf/HashSet.h>
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
using URLSchemesMap = HashSet<String, ASCIICaseInsensitiveHash>;
class SchemeRegistry {
public:
WEBCORE_EXPORT static void registerURLSchemeAsLocal(const String&);
static void removeURLSchemeRegisteredAsLocal(const String&);
WEBCORE_EXPORT static bool shouldTreatURLSchemeAsLocal(const String&);
WEBCORE_EXPORT static bool isBuiltinScheme(const String&);
WEBCORE_EXPORT static void registerURLSchemeAsSecure(const String&);
static bool shouldTreatURLSchemeAsSecure(const String&);
WEBCORE_EXPORT static void registerURLSchemeAsNoAccess(const String&);
static bool shouldTreatURLSchemeAsNoAccess(const String&);
WEBCORE_EXPORT static void registerURLSchemeAsDisplayIsolated(const String&);
static bool shouldTreatURLSchemeAsDisplayIsolated(const String&);
WEBCORE_EXPORT static void registerURLSchemeAsEmptyDocument(const String&);
WEBCORE_EXPORT static bool shouldLoadURLSchemeAsEmptyDocument(const String&);
WEBCORE_EXPORT static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String&);
static bool isDomainRelaxationForbiddenForURLScheme(const String&);
static bool canDisplayOnlyIfCanRequest(const String& scheme);
static void registerAsCanDisplayOnlyIfCanRequest(const String& scheme);
static void registerURLSchemeAsNotAllowingJavascriptURLs(const String& scheme);
static bool shouldTreatURLSchemeAsNotAllowingJavascriptURLs(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing(const String& scheme);
WEBCORE_EXPORT static bool allowsLocalStorageAccessInPrivateBrowsing(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(const String& scheme);
static bool allowsDatabaseAccessInPrivateBrowsing(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeAsCORSEnabled(const String& scheme);
static bool shouldTreatURLSchemeAsCORSEnabled(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme);
WEBCORE_EXPORT static void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme);
static bool schemeShouldBypassContentSecurityPolicy(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeAsAlwaysRevalidated(const String&);
static bool shouldAlwaysRevalidateURLScheme(const String&);
WEBCORE_EXPORT static void registerURLSchemeAsCachePartitioned(const String& scheme);
static bool shouldPartitionCacheForURLScheme(const String& scheme);
WEBCORE_EXPORT static void registerURLSchemeServiceWorkersCanHandle(const String& scheme);
WEBCORE_EXPORT static bool canServiceWorkersHandleURLScheme(const String& scheme);
static bool isServiceWorkerContainerCustomScheme(const String& scheme);
static bool isUserExtensionScheme(const String& scheme);
};
}