android-components / mozilla.components.concept.engine.history / HistoryTrackingDelegate

HistoryTrackingDelegate

interface HistoryTrackingDelegate (source)

An interface used for providing history information to an engine (e.g. for link highlighting), and receiving history updates from the engine (visits to URLs, title changes).

Even though this interface is defined at the "concept" layer, it's get* methods are tailored to two types of engines which we support (system's WebView and GeckoView).

Functions

getVisited

abstract fun getVisited(uris: List<String>, callback: (List<Boolean>) -> Unit, privateMode: Boolean): Unit

An engine needs to know "visited" (true/false) status for provided URIs.

abstract fun getVisited(callback: (List<String>) -> Unit, privateMode: Boolean): Unit

An engine needs to know a list of all visited URIs.

onTitleChanged

abstract fun onTitleChanged(uri: String, title: String, privateMode: Boolean): Unit

Title changed for a given URI.

onVisited

abstract fun onVisited(uri: String, isReload: Boolean = false, privateMode: Boolean): Unit

A URI visit happened that an engine considers worthy of being recorded in browser's history.