From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- chrome/nsChromeRegistryContent.h | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 chrome/nsChromeRegistryContent.h (limited to 'chrome/nsChromeRegistryContent.h') diff --git a/chrome/nsChromeRegistryContent.h b/chrome/nsChromeRegistryContent.h new file mode 100644 index 000000000..0a74d13db --- /dev/null +++ b/chrome/nsChromeRegistryContent.h @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 8; 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 nsChromeRegistryContent_h +#define nsChromeRegistryContent_h + +#include "nsChromeRegistry.h" +#include "nsClassHashtable.h" + +struct ChromePackage; +struct SubstitutionMapping; +struct OverrideMapping; + +class nsChromeRegistryContent : public nsChromeRegistry +{ + public: + nsChromeRegistryContent(); + + void RegisterRemoteChrome(const InfallibleTArray& aPackages, + const InfallibleTArray& aResources, + const InfallibleTArray& aOverrides, + const nsACString& aLocale, + bool aReset); + + NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage, + nsIUTF8StringEnumerator* *aResult) override; + NS_IMETHOD CheckForNewChrome() override; + NS_IMETHOD CheckForOSAccessibility() override; + NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, + const char16_t* aData) override; + NS_IMETHOD IsLocaleRTL(const nsACString& package, + bool *aResult) override; + NS_IMETHOD GetSelectedLocale(const nsACString& aPackage, + bool aAsBCP47, + nsACString& aLocale) override; + NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL, + nsISimpleEnumerator **aResult) override; + NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL, + nsISimpleEnumerator **aResult) override; + + void RegisterPackage(const ChromePackage& aPackage); + void RegisterOverride(const OverrideMapping& aOverride); + void RegisterSubstitution(const SubstitutionMapping& aResource); + + private: + struct PackageEntry + { + PackageEntry() : flags(0) { } + ~PackageEntry() { } + + nsCOMPtr contentBaseURI; + nsCOMPtr localeBaseURI; + nsCOMPtr skinBaseURI; + uint32_t flags; + }; + + nsresult UpdateSelectedLocale() override; + nsIURI* GetBaseURIFromPackage(const nsCString& aPackage, + const nsCString& aProvider, + const nsCString& aPath) override; + nsresult GetFlagsFromPackage(const nsCString& aPackage, uint32_t* aFlags) override; + + nsClassHashtable mPackagesHash; + nsCString mLocale; + + virtual void ManifestContent(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestLocale(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestSkin(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestOverlay(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestStyle(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestOverride(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; + virtual void ManifestResource(ManifestProcessingContext& cx, int lineno, + char *const * argv, int flags) override; +}; + +#endif // nsChromeRegistryContent_h -- cgit v1.2.3