зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
7f4eae8402
Коммит
dadb2923a9
|
@ -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"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче