Backed out changeset 0718dffcd078 (bug 1068087)

This commit is contained in:
Carsten "Tomcat" Book 2015-03-04 09:15:21 +01:00
parent a48cc48252
commit 06c77c3f2f
3 changed files with 4 additions and 29 deletions

View File

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

View File

@ -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>

View File

@ -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)]);
});
});