Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | |
michael@0 | 9 | [scriptable, uuid(924d98d9-3518-4cb4-8708-c74fe8e3ec3c)] |
michael@0 | 10 | interface nsIFontEnumerator : nsISupports |
michael@0 | 11 | { |
michael@0 | 12 | /** |
michael@0 | 13 | * Return a sorted array of the names of all installed fonts. |
michael@0 | 14 | * |
michael@0 | 15 | * @param aCount returns number of names returned |
michael@0 | 16 | * @param aResult returns array of names |
michael@0 | 17 | * @return void |
michael@0 | 18 | */ |
michael@0 | 19 | void EnumerateAllFonts(out uint32_t aCount, |
michael@0 | 20 | [retval, array, size_is(aCount)] out wstring aResult); |
michael@0 | 21 | |
michael@0 | 22 | /** |
michael@0 | 23 | * Return a sorted array of names of fonts that support the given language |
michael@0 | 24 | * group and are suitable for use as the given CSS generic font. |
michael@0 | 25 | * |
michael@0 | 26 | * @param aLangGroup language group |
michael@0 | 27 | * @param aGeneric CSS generic font |
michael@0 | 28 | * @param aCount returns number of names returned |
michael@0 | 29 | * @param aResult returns array of names |
michael@0 | 30 | * @return void |
michael@0 | 31 | */ |
michael@0 | 32 | void EnumerateFonts(in string aLangGroup, in string aGeneric, |
michael@0 | 33 | out uint32_t aCount, [retval, array, size_is(aCount)] out wstring aResult); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | @param aLangGroup language group |
michael@0 | 37 | @return bool do we have a font for this language group |
michael@0 | 38 | */ |
michael@0 | 39 | void HaveFontFor(in string aLangGroup, [retval] out boolean aResult); |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * @param aLangGroup language group |
michael@0 | 43 | * @param aGeneric CSS generic font |
michael@0 | 44 | * @return suggested default font for this language group and generic family |
michael@0 | 45 | */ |
michael@0 | 46 | wstring getDefaultFont(in string aLangGroup, in string aGeneric); |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * update the global font list |
michael@0 | 50 | * return true if font list is changed |
michael@0 | 51 | */ |
michael@0 | 52 | boolean updateFontList(); |
michael@0 | 53 | |
michael@0 | 54 | /** |
michael@0 | 55 | * get the standard family name on the system from given family |
michael@0 | 56 | * @param aName family name which may be alias |
michael@0 | 57 | * @return the standard family name on the system, if given name does not |
michael@0 | 58 | * exist, returns empty string |
michael@0 | 59 | */ |
michael@0 | 60 | wstring getStandardFamilyName(in wstring aName); |
michael@0 | 61 | }; |