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

AwesomeBarFeature

class AwesomeBarFeature (source)

Connects an AwesomeBar with a Toolbar and allows adding multiple AwesomeBar.SuggestionProvider implementations.

Constructors

Name Summary
<init> AwesomeBarFeature(awesomeBar: AwesomeBar, toolbar: Toolbar, engineView: EngineView? = null, icons: BrowserIcons? = null, onEditStart: () -> Unit = null, onEditComplete: () -> Unit = null)
Connects an AwesomeBar with a Toolbar and allows adding multiple AwesomeBar.SuggestionProvider implementations.

Functions

Name Summary
addClipboardProvider fun addClipboardProvider(context: <ERROR CLASS>, loadUrlUseCase: LoadUrlUseCase): AwesomeBarFeature
addHistoryProvider fun addHistoryProvider(historyStorage: HistoryStorage, loadUrlUseCase: LoadUrlUseCase): AwesomeBarFeature
Add a AwesomeBar.SuggestionProvider for browsing history to the AwesomeBar.
addSearchProvider fun addSearchProvider(searchEngine: SearchEngine, searchUseCase: SearchUseCase, fetchClient: Client, limit: Int = 15, mode: Mode = SearchSuggestionProvider.Mode.SINGLE_SUGGESTION): AwesomeBarFeature
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
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.
addSessionProvider fun addSessionProvider(sessionManager: SessionManager, selectTabUseCase: SelectTabUseCase): AwesomeBarFeature
Add a AwesomeBar.SuggestionProvider for “Open tabs” to the AwesomeBar.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.