Chrome documentation: https://developer.chrome.com/extensions/management#method-getAll
The last time that we talked about this, there was some question about whether we actually wanted to implement it. As I recall, we decided we wouldn't implement it until we had some idea of what extensions are actually using it for.
Some examples of usage from "popular chrome extensions": - Video Downloader Pro is using it to look for a particular extension (Google Cast) to see if it is installed and/or enabled. If both are true then it uses it for playback. If it is not installed the user is asked to install it, and if it is not enabled then the user is asked to enable it. - Adblock uses it in a number of ways: - It gathers a list of all installed extensions which is then provided to a bug report which can be submitted. - It gathers a list of all installed extensions for display on a screen to help diagnose problems. - It has a feature that allows a user to disable all other extensions, for which it uses getAll to get the list of those extensions. I assume that this is also for troubleshooting purposes. - Flash Video Downloader uses it in a similar manner to Video Downloader Pro in that it looks for specific extensions to see if they are installed, and if they are it enables features of itself that are only available if said extensions are installed. Do these seem like valid enough use cases to implement the method? We have flagged it for implementation as part of the project to enable more Chrome extensions to run in Firefox.
should also implement chrome.management.get at same time - putting on one bug (closed bug 1283687 as dupe to this one) Chrome documentation: https://developer.chrome.com/extensions/management#method-get
(In reply to Bob Silverberg [:bsilverberg] from comment #3) > - Video Downloader Pro is using it to look for a particular extension > (Google Cast) to see if it is installed and/or enabled. If both are true > then it uses it for playback. If it is not installed the user is asked to > install it, and if it is not enabled then the user is asked to enable it. Does Google Cast even work in Firefox? Is it even possible for it to? > - Adblock uses it in a number of ways: > - It gathers a list of all installed extensions which is then provided > to a bug report which can be submitted. > - It gathers a list of all installed extensions for display on a screen > to help diagnose problems. We have about:support for this. > - It has a feature that allows a user to disable all other extensions, > for which it uses getAll to get the list of those > extensions. I assume that this is also for troubleshooting purposes. This would require us to also implement that functionality for it to be useful. Either way, the lack of this feature doesn't seem like it should prevent significant parts of the add-on from working. > - Flash Video Downloader uses it in a similar manner to Video Downloader Pro > in that it looks for specific extensions to see if they are installed, and > if they are it enables features of itself that are only available if said > extensions are installed. Are any of these extensions relevant to Firefox? Maybe we should consider initially implementing this as a stub that just returns the entry for the add-on itself, and decide later how we want to handle the full implementation.
We are going to hold off on implementing this API method until some compelling use cases are presented by the developer community.
Here is another use case (it's not in the current Chromium extension yet, but I'll implement it in the future if Firefox also supports it): Retrieving a list of installed addons so that their source code can be viewed with my Extension Source Viewer (https://github.com/Rob--W/crxviewer). For this I would need management.getAll + the following of ExtensionInfo (https://developer.chrome.com/extensions/management#type-ExtensionInfo): - id (to find the listing on AMO) - name - version (to select a specific listing on AMO) - icons (optional, to make the list of extensions prettier) - installType (to see whether it's probably installed via the addon gallery - e.g. "development" if loaded via about:debugging and "normal" otherwise).
Here is our use case for this feature: We are an international market research company that recruits volunteers to install software (including a Firefox extension) that automatically reports on their media consumption and web usage. We would like to get information about other installed extensions so that we can report statistics such as marketshare and install base to our clients. We currently report this information for Firefox using a legacy extension, but will lose this data when switching to WebExtensions. There is a potential for Firefox extension authors and Mozilla to be impacted by this if they happen to be clients as well.
This is a use case that I'm already using in Chrome & Opera. I have an extension for OGame, a browser game, called UniverseView. There are also a lot of other extensions and this API helps me to detect which extensions are installed. When a certain extension is installed my extension doesn't execute certain code to avoid conflicts.
One more use case for this: the weh toolkit (https://github.com/mi-g/weh) is a set of tools to help developing WebExtensions add-ons. It contains an extension, weh-inspector, able to monitor messages, preferences and storage from weh-based installed extensions. The lack of browser.management.getAll API prevents weh-inspector to discover automatically what other add-ons can be inspected. Note that the lack of runtime.messageExternal support (bug#1258360) is even more critical for weh-inspector to run on Firefox.
Another case here: in Adnauseam(https://github.com/dhowe/AdNauseam), we use management.getAll to check for enabled extensions that may conflict (other adblockers making modifications to request headers, etc), and then warn the user that only one should probably be used at the same time.
I have a use case for this bug: Persona Switcher (https://github.com/drsjb80/personaswitcher) is an add-on that lets you easily switch between personas/themes in Mozilla Firefox, Thunderbird, and SeaMonkey. Currently we are working on migrating this add-on to a WebExtension, however, we will lose the functionality and be unable to switch between personas once we do this. The management API would help us access the themes and switch between them in Firefox with the getAll() and setEnabled() functions