In our case we do not want to change any of the implementation and reuse BasicSelectionActionDelegate. We need to know if a text selection toolbar is showing (internally mResponse != null) and have a way to clear it (clearSelection()).
(1) One option would be to create those methods or make them accessible so that we can call them by going through GeckoSession and the delegate. Currently clearSelection() is protected and mResponse is not visible.
(2) As another option we could create our own SelectionActionDelegate implementation that delegates to a BasicSelectionActionDelegate object (which basically means implementing option 1 ourselves). But that is quite hard: BasicSelectionActionDelegate needs an Activity that doesn't always exist since it has a different lifecycle. Internally GeckoView seems to do some dance to set and clear the delegate depending on whether a session is rendered or released. Replicating this seems quite complicated and error-prone.