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
parent 6640b227f7
commit 8c8aec2bf9

View File

@ -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;
},