Bug 577694 - Add detection of accessibility instantiation [r=mark.finkle]

This commit is contained in:
Jono X 2011-04-11 22:30:44 -04:00
Родитель 3734c125a4
Коммит 69f2ce5580
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -117,6 +117,19 @@ let MetadataCollector = {
accessibilities.push({ name: prefName, value: prefValue });
}
/* Detect accessibility instantiation
* (David Bolter's code from bug 577694) */
let enabled;
try {
enabled = Components.manager.QueryInterface(Ci.nsIServiceManager)
.isServiceInstantiatedByContractID(
"@mozilla.org/accessibilityService;1",
Ci.nsISupports);
} catch (ex) {
enabled = false;
}
accessibilities.push({name: "isInstantiated", value: enabled});
return accessibilities;
},