android-components / mozilla.components.browser.toolbar / AsyncAutocompleteDelegate

AsyncAutocompleteDelegate

class AsyncAutocompleteDelegate : AutocompleteDelegate, CoroutineScope (source)

An autocomplete delegate which is aware of its parent scope (to check for cancellations). Responsible for processing autocompletion results and discarding stale results when urlView moved on.

Constructors

Name Summary
<init> AsyncAutocompleteDelegate(urlView: AutocompleteView, parentScope: CoroutineScope, coroutineContext: CoroutineContext, logger: Logger = Logger("AsyncAutocompleteDelegate"))
An autocomplete delegate which is aware of its parent scope (to check for cancellations). Responsible for processing autocompletion results and discarding stale results when urlView moved on.

Properties

Name Summary
coroutineContext val coroutineContext: CoroutineContext

Functions

Name Summary
applyAutocompleteResult fun applyAutocompleteResult(result: AutocompleteResult): Unit
noAutocompleteResult fun noAutocompleteResult(input: String): Unit
Autocompletion was invoked and no match was returned.

Extension Functions

Name Summary
launchGeckoResult fun <T> CoroutineScope.launchGeckoResult(context: CoroutineContext = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> T): GeckoResult<T>
Create a GeckoResult from a co-routine.