summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-26 04:31:11 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-08-04 08:07:02 +0200
commitbc2584493a853c318cbd7b146f6c1f013fbed62a (patch)
tree7580592d1fc5afa13ab1f66426228c39d4a32081
parent0f387725735fedc7e1b8d9bcfcb47f4c4a9880c7 (diff)
downloadUXP-bc2584493a853c318cbd7b146f6c1f013fbed62a.tar
UXP-bc2584493a853c318cbd7b146f6c1f013fbed62a.tar.gz
UXP-bc2584493a853c318cbd7b146f6c1f013fbed62a.tar.lz
UXP-bc2584493a853c318cbd7b146f6c1f013fbed62a.tar.xz
UXP-bc2584493a853c318cbd7b146f6c1f013fbed62a.zip
[PALEMOON] Bug 863773 - Changes the way plugin handlers are loaded at the preferences applications pane. Uses enabledPlugin attribute from each navigator.mimeTypes to find the actual plugin used to handle the mime type
-rw-r--r--application/palemoon/components/preferences/applications.js33
1 files changed, 12 insertions, 21 deletions
diff --git a/application/palemoon/components/preferences/applications.js b/application/palemoon/components/preferences/applications.js
index 1936f5ee8..d06f9f9fb 100644
--- a/application/palemoon/components/preferences/applications.js
+++ b/application/palemoon/components/preferences/applications.js
@@ -1069,29 +1069,20 @@ var gApplicationsPane = {
_loadPluginHandlers: function() {
"use strict";
- let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
- let pluginTags = pluginHost.getPluginTags();
-
- for (let i = 0; i < pluginTags.length; ++i) {
- let pluginTag = pluginTags[i];
-
- let mimeTypes = pluginTag.getMimeTypes();
- for (let j = 0; j < mimeTypes.length; ++j) {
- let type = mimeTypes[j];
-
- let handlerInfoWrapper;
- if (type in this._handledTypes)
- handlerInfoWrapper = this._handledTypes[type];
- else {
- let wrappedHandlerInfo =
- this._mimeSvc.getFromTypeAndExtension(type, null);
- handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
- handlerInfoWrapper.handledOnlyByPlugin = true;
- this._handledTypes[type] = handlerInfoWrapper;
- }
+ let mimeTypes = navigator.mimeTypes;
- handlerInfoWrapper.pluginName = pluginTag.name;
+ for (let mimeType of mimeTypes) {
+ let handlerInfoWrapper;
+ if (mimeType.type in this._handledTypes) {
+ handlerInfoWrapper = this._handledTypes[mimeType.type];
+ } else {
+ let wrappedHandlerInfo =
+ this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
+ handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
+ handlerInfoWrapper.handledOnlyByPlugin = true;
+ this._handledTypes[mimeType.type] = handlerInfoWrapper;
}
+ handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
}
},