extensionSystem: Turn into a class

The extension system started out as a set of simple functions, but
gained more state later, and even some hacks to emit signals without
having an object to emit them on.

There is no good reason for that weirdness, so rather than imitating an
object, wrap the existing system into a real ExtensionManager object.

https://bugzilla.gnome.org/show_bug.cgi?id=789852
This commit is contained in:
Florian Müllner
2019-03-07 01:45:45 +01:00
committed by Florian Müllner
parent d82810240f
commit ea17740719
5 changed files with 299 additions and 304 deletions

View File

@ -46,6 +46,7 @@ const LOG_DOMAIN = 'GNOME Shell';
const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';
var componentManager = null;
var extensionManager = null;
var panel = null;
var overview = null;
var runDialog = null;
@ -226,7 +227,7 @@ function _initializeUI() {
_startDate = new Date();
ExtensionDownloader.init();
ExtensionSystem.init();
extensionManager = new ExtensionSystem.ExtensionManager();
if (sessionMode.isGreeter && screenShield) {
layoutManager.connect('startup-prepared', () => {