Dear GeckoView consumers,

We're planning to have a breaking change in 75 or 76 regarding the
WebExtension API.

Today to set the ActionDelegate and the MessageDelegate on a GeckoSession
the API is

session.setWebExtensionActionDelegate
session.setMessageDelegate

Given the long list of delegates that we already have on GeckoSession,
we're considering moving this to a SessionController (similar to the
existing WebExtensionController on GeckoRuntime). The proposed new API
would be

session.getWebExtensionController().setActionDelegate(...)
session.getWebExtensionController().setMessageDelegate(...)

As part of this change we will also add a TabDelegate to the session that
handles APIs from the WebExtension tabs API. This will also include moving
onCloseTab API from the runtime delegate to the session delegate, which
means you will get onCloseTab on the session directly.

Today you do:

class TabDelegate implements WebExtension.TabDelegate {
     GeckoResult<AllowOrDeny> onCloseTab(WebExtension, GeckoSession) {
     }
}
runtime.setTabDelegate(new TabDelegate(...))

After this change you will do

class TabDelegate implements WebExtension.TabDelegate {
     GeckoResult<AllowOrDeny> onCloseTab(WebExtension, GeckoSession) {
     }
}
session.getWebExtensionController().setTabDelegate(new TabDelegate(...))

Please let me know if you have any concern about this either by responding
to this email or at https://chat.mozilla.org/#/room/#geckoview:mozilla.org

The implementation for this will be done as part of
https://bugzilla.mozilla.org/show_bug.cgi?id=1616625

Thanks
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to