Create a service that can be asked whether a given webnavigation (or a

"typical" webnavigation) supports loading of a certain MIME type.  Bug 283125,
r=biesi, sr=darin
This commit is contained in:
bzbarsky%mit.edu 2006-05-17 02:39:08 +00:00
Родитель 7f4eae8402
Коммит dadb2923a9
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -315,9 +315,10 @@
// Check if Mozilla can handle this type internally, in which case
// an entry would have no effect
try {
var categoryManager = Components.classes["@mozilla.org/categorymanager;1"]
.getService(Components.interfaces.nsICategoryManager);
if (categoryManager.getCategoryEntry("Gecko-Content-Viewers", gMIMEField.value)) {
var webNavigationInfo =
Components.classes["@mozilla.org/webnavigation-info;1"]
.getService(Components.interfaces.nsIWebNavigationInfo);
if (webNavigationInfo.isTypeSupported(gMIMEField.value, null)) {
var brandBundle = document.getElementById("bundle_Brand");
var text = gPrefApplicationsBundle.getString("canHandleInternally");
text = text.replace(/%brand%/g, brandBundle.getString("brandShortName"));