diff --git a/mobile/android/chrome/geckoview/geckoview.js b/mobile/android/chrome/geckoview/geckoview.js index ac39418a013b..88b2febb37ed 100644 --- a/mobile/android/chrome/geckoview/geckoview.js +++ b/mobile/android/chrome/geckoview/geckoview.js @@ -260,11 +260,6 @@ var ModuleManager = { module.impl.onSettingsUpdate(); } }); - - this._browser.messageManager.sendAsyncMessage( - "GeckoView:UpdateSettings", - aSettings - ); }, onMessageFromActor(aActorName, aMessage) { @@ -492,7 +487,7 @@ class ModuleInfo { } } - this._updateContentModuleState(/* includeSettings */ aEnabled); + this._updateContentModuleState(); } receiveMessage(aMessage) { @@ -504,20 +499,19 @@ class ModuleInfo { } onContentModuleLoaded() { - this._updateContentModuleState(/* includeSettings */ true); + this._updateContentModuleState(); if (this._impl) { this._impl.onContentModuleLoaded(); } } - _updateContentModuleState(aIncludeSettings) { + _updateContentModuleState() { this._manager.messageManager.sendAsyncMessage( "GeckoView:UpdateModuleState", { module: this._name, enabled: this.enabled, - settings: aIncludeSettings ? this._manager.settings : null, } ); } diff --git a/mobile/android/modules/geckoview/GeckoViewChildModule.jsm b/mobile/android/modules/geckoview/GeckoViewChildModule.jsm index ea7387b955db..77b70a960cd3 100644 --- a/mobile/android/modules/geckoview/GeckoViewChildModule.jsm +++ b/mobile/android/modules/geckoview/GeckoViewChildModule.jsm @@ -27,7 +27,6 @@ class GeckoViewChildModule { this.moduleName = aModuleName; this.messageManager = aGlobal; this.enabled = false; - this.settings = {}; if (!aGlobal._gvEventDispatcher) { aGlobal._gvEventDispatcher = GeckoViewUtils.getDispatcherForWindow( @@ -47,11 +46,6 @@ class GeckoViewChildModule { } this.eventDispatcher = aGlobal._gvEventDispatcher; - this.messageManager.addMessageListener("GeckoView:UpdateSettings", aMsg => { - Object.assign(this.settings, aMsg.data); - this.onSettingsUpdate(); - }); - this.messageManager.addMessageListener( "GeckoView:UpdateModuleState", aMsg => { @@ -59,11 +53,7 @@ class GeckoViewChildModule { return; } - const { enabled, settings } = aMsg.data; - - if (settings) { - Object.assign(this.settings, settings); - } + const { enabled } = aMsg.data; if (enabled !== this.enabled) { if (!enabled) { @@ -76,10 +66,6 @@ class GeckoViewChildModule { this.onEnable(); } } - - if (settings) { - this.onSettingsUpdate(); - } } ); @@ -93,9 +79,6 @@ class GeckoViewChildModule { // Override to initialize module. onInit() {} - // Override to detect settings change. Access settings via this.settings. - onSettingsUpdate() {} - // Override to enable module after setting a Java delegate. onEnable() {}