android-components / mozilla.components.feature.awesomebar / AwesomeBarFeature / addSearchProvider

addSearchProvider

fun addSearchProvider(searchEngine: SearchEngine, searchUseCase: SearchUseCase, fetchClient: Client, limit: Int = 15, mode: Mode = SearchSuggestionProvider.Mode.SINGLE_SUGGESTION): AwesomeBarFeature (source)

Adds a AwesomeBar.SuggestionProvider for search engine suggestions to the AwesomeBar.

fun addSearchProvider(context: <ERROR CLASS>, searchEngineManager: SearchEngineManager, searchUseCase: SearchUseCase, fetchClient: Client, limit: Int = 15, mode: Mode = SearchSuggestionProvider.Mode.SINGLE_SUGGESTION): AwesomeBarFeature (source)

Adds a AwesomeBar.SuggestionProvider for search engine suggestions to the AwesomeBar. If the default search engine is to be used for fetching search engine suggestions then this method is preferable over addSearchProvider, as it will lazily load the default search engine using the provided SearchEngineManager.