mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 0718dffcd078 (bug 1068087)
This commit is contained in:
parent
a48cc48252
commit
06c77c3f2f
@ -43,10 +43,7 @@ static RedirEntry kRedirMap[] = {
|
||||
"mozilla", "chrome://global/content/mozilla.xhtml",
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT
|
||||
},
|
||||
{
|
||||
"plugins", "chrome://global/content/plugins.html",
|
||||
nsIAboutModule::URI_MUST_LOAD_IN_CHILD
|
||||
},
|
||||
{ "plugins", "chrome://global/content/plugins.html", 0 },
|
||||
{ "config", "chrome://global/content/config.xul", 0 },
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
{ "crashes", "chrome://global/content/crashes.xhtml", 0 },
|
||||
|
@ -9,6 +9,8 @@
|
||||
<script type="application/javascript">
|
||||
"use strict";
|
||||
|
||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
|
||||
var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties");
|
||||
@ -56,7 +58,7 @@
|
||||
*/
|
||||
navigator.plugins.refresh(false);
|
||||
|
||||
addMessageListener("PluginList", function({ data: aPlugins }) {
|
||||
AddonManager.getAddonsByTypes(["plugin"], function (aPlugins) {
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
// "Installed plugins"
|
||||
@ -213,8 +215,6 @@
|
||||
|
||||
document.getElementById("outside").appendChild(fragment);
|
||||
});
|
||||
|
||||
sendAsyncMessage("RequestPlugins");
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -2988,25 +2988,3 @@ Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", AddonManagerInternal
|
||||
Object.freeze(AddonManagerInternal);
|
||||
Object.freeze(AddonManagerPrivate);
|
||||
Object.freeze(AddonManager);
|
||||
|
||||
// Functions to support about:plugins
|
||||
Cu.import("resource://gre/modules/RemotePageManager.jsm");
|
||||
|
||||
// Lists all the properties that plugins.html needs
|
||||
const NEEDED_PROPS = ["name", "pluginLibraries", "pluginFullpath", "version",
|
||||
"isActive", "blocklistState", "description",
|
||||
"pluginMimeTypes"];
|
||||
function filterProperties(plugin) {
|
||||
let filtered = {};
|
||||
for (let prop of NEEDED_PROPS) {
|
||||
filtered[prop] = plugin[prop];
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
|
||||
let listener = new RemotePages("about:plugins");
|
||||
listener.addMessageListener("RequestPlugins", ({ target: port }) => {
|
||||
AddonManager.getAddonsByTypes(["plugin"], function (aPlugins) {
|
||||
port.sendAsyncMessage("PluginList", [filterProperties(p) for (p of aPlugins)]);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user