1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 ChromeUtils.defineESModuleGetters(lazy, {
8 AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
11 // Lists all the properties that plugins.html needs
12 const NEEDED_PROPS = [
22 export class AboutPluginsParent extends JSWindowActorParent {
23 async receiveMessage(message) {
24 switch (message.name) {
25 case "RequestPlugins":
26 function filterProperties(plugin) {
28 for (let prop of NEEDED_PROPS) {
29 filtered[prop] = plugin[prop];
34 let plugins = await lazy.AddonManager.getAddonsByTypes(["plugin"]);
35 return plugins.map(filterProperties);