intl/hyphenation/public/nsHyphenationManager.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsHyphenationManager_h__
     7 #define nsHyphenationManager_h__
     9 #include "nsInterfaceHashtable.h"
    10 #include "nsRefPtrHashtable.h"
    11 #include "nsHashKeys.h"
    12 #include "nsIObserver.h"
    13 #include "mozilla/Omnijar.h"
    15 class nsHyphenator;
    16 class nsIAtom;
    17 class nsIURI;
    19 class nsHyphenationManager
    20 {
    21 public:
    22   nsHyphenationManager();
    24   already_AddRefed<nsHyphenator> GetHyphenator(nsIAtom *aLocale);
    26   static nsHyphenationManager *Instance();
    28   static void Shutdown();
    30 private:
    31   ~nsHyphenationManager();
    33 protected:
    34   class MemoryPressureObserver MOZ_FINAL : public nsIObserver
    35   {
    36   public:
    37       NS_DECL_ISUPPORTS
    38       NS_DECL_NSIOBSERVER
    39   };
    41   void LoadPatternList();
    42   void LoadPatternListFromOmnijar(mozilla::Omnijar::Type aType);
    43   void LoadPatternListFromDir(nsIFile *aDir);
    44   void LoadAliases();
    46   nsInterfaceHashtable<nsISupportsHashKey,nsIAtom> mHyphAliases;
    47   nsInterfaceHashtable<nsISupportsHashKey,nsIURI> mPatternFiles;
    48   nsRefPtrHashtable<nsISupportsHashKey,nsHyphenator> mHyphenators;
    50   static nsHyphenationManager *sInstance;
    51 };
    53 #endif // nsHyphenationManager_h__

mercurial