Implement new feature-tabs API.
parent
cbad832b19
commit
fdd3d29cd4
|
@ -34,6 +34,7 @@ interface SearchController {
|
||||||
fun handleSearchShortcutEngineSelected(searchEngine: SearchEngine)
|
fun handleSearchShortcutEngineSelected(searchEngine: SearchEngine)
|
||||||
fun handleClickSearchEngineSettings()
|
fun handleClickSearchEngineSettings()
|
||||||
fun handleExistingSessionSelected(session: Session)
|
fun handleExistingSessionSelected(session: Session)
|
||||||
|
fun handleExistingSessionSelected(tabId: String)
|
||||||
fun handleSearchShortcutsButtonClicked()
|
fun handleSearchShortcutsButtonClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,4 +152,11 @@ class DefaultSearchController(
|
||||||
from = BrowserDirection.FromSearch
|
from = BrowserDirection.FromSearch
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun handleExistingSessionSelected(tabId: String) {
|
||||||
|
val session = context.components.core.sessionManager.findSessionById(tabId)
|
||||||
|
if (session != null) {
|
||||||
|
handleExistingSessionSelected(session)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,4 +52,8 @@ class SearchInteractor(
|
||||||
override fun onExistingSessionSelected(session: Session) {
|
override fun onExistingSessionSelected(session: Session) {
|
||||||
searchController.handleExistingSessionSelected(session)
|
searchController.handleExistingSessionSelected(session)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onExistingSessionSelected(tabId: String) {
|
||||||
|
searchController.handleExistingSessionSelected(tabId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,11 @@ interface AwesomeBarInteractor {
|
||||||
*/
|
*/
|
||||||
fun onExistingSessionSelected(session: Session)
|
fun onExistingSessionSelected(session: Session)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called whenever an existing session is selected from the sessionSuggestionProvider
|
||||||
|
*/
|
||||||
|
fun onExistingSessionSelected(tabId: String)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called whenever the Shortcuts button is clicked
|
* Called whenever the Shortcuts button is clicked
|
||||||
*/
|
*/
|
||||||
|
@ -120,6 +125,10 @@ class AwesomeBarView(
|
||||||
override fun invoke(session: Session) {
|
override fun invoke(session: Session) {
|
||||||
interactor.onExistingSessionSelected(session)
|
interactor.onExistingSessionSelected(session)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun invoke(tabId: String) {
|
||||||
|
interactor.onExistingSessionSelected(tabId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
Loading…
Reference in New Issue