android-components / mozilla.components.browser.engine.gecko / GeckoEngine

GeckoEngine

class GeckoEngine : Engine, WebExtensionRuntime (source)

Gecko-based implementation of Engine interface.

Constructors

Name Summary
<init> GeckoEngine(context: <ERROR CLASS>, defaultSettings: Settings? = null, runtime: GeckoRuntime = GeckoRuntime.getDefault(context), executorProvider: () -> GeckoWebExecutor = { GeckoWebExecutor(runtime) }, trackingProtectionExceptionStore: TrackingProtectionExceptionStorage = TrackingProtectionExceptionFileStorage(context, runtime))
Gecko-based implementation of Engine interface.

Properties

Name Summary
settings val settings: Settings
See Engine.settings
trackingProtectionExceptionStore val trackingProtectionExceptionStore: TrackingProtectionExceptionStorage
Provides access to the tracking protection exception list for this engine.
version val version: EngineVersion
Returns the version of the engine as EngineVersion object.

Functions

Name Summary
clearData fun clearData(data: BrowsingData, host: String?, onSuccess: () -> Unit, onError: (Throwable) -> Unit): Unit
See Engine.clearData.
createSession fun createSession(private: Boolean, contextId: String?): EngineSession
See Engine.createSession.
createSessionState fun createSessionState(json: <ERROR CLASS>): EngineSessionState
See Engine.createSessionState.
createView fun createView(context: <ERROR CLASS>, attrs: <ERROR CLASS>?): EngineView
Creates a new Gecko-based EngineView.
disableWebExtension fun disableWebExtension(extension: WebExtension, source: EnableSource, onSuccess: (WebExtension) -> Unit, onError: (Throwable) -> Unit): Unit
See Engine.disableWebExtension.
enableWebExtension fun enableWebExtension(extension: WebExtension, source: EnableSource, onSuccess: (WebExtension) -> Unit, onError: (Throwable) -> Unit): Unit
See Engine.enableWebExtension.
getTrackersLog fun getTrackersLog(session: EngineSession, onSuccess: (List<TrackerLog>) -> Unit, onError: (Throwable) -> Unit): Unit
Fetch a list of trackers logged for a given session .
installWebExtension fun installWebExtension(id: String, url: String, allowContentMessaging: Boolean, supportActions: Boolean, onSuccess: (WebExtension) -> Unit, onError: (String, Throwable) -> Unit): Unit
See Engine.installWebExtension.
listInstalledWebExtensions fun listInstalledWebExtensions(onSuccess: (List<WebExtension>) -> Unit, onError: (Throwable) -> Unit): Unit
See Engine.listInstalledWebExtensions.
name fun name(): String
Returns the name of this engine. The returned string might be used in filenames and must therefore only contain valid filename characters.
registerWebExtensionDelegate fun registerWebExtensionDelegate(webExtensionDelegate: WebExtensionDelegate): Unit
See Engine.registerWebExtensionDelegate.
registerWebNotificationDelegate fun registerWebNotificationDelegate(webNotificationDelegate: WebNotificationDelegate): Unit
See Engine.registerWebNotificationDelegate.
registerWebPushDelegate fun registerWebPushDelegate(webPushDelegate: WebPushDelegate): WebPushHandler
See Engine.registerWebPushDelegate.
speculativeConnect fun speculativeConnect(url: String): Unit
Opens a speculative connection to the host of url.
speculativeCreateSession fun speculativeCreateSession(private: Boolean, contextId: String?): Unit
See Engine.speculativeCreateSession.
uninstallWebExtension fun uninstallWebExtension(ext: WebExtension, onSuccess: () -> Unit, onError: (String, Throwable) -> Unit): Unit
See Engine.uninstallWebExtension.
updateWebExtension fun updateWebExtension(extension: WebExtension, onSuccess: (WebExtension?) -> Unit, onError: (String, Throwable) -> Unit): Unit
See Engine.updateWebExtension.

Inherited Functions

Name Summary
warmUp open fun warmUp(): Unit
Makes sure all required engine initialization logic is executed. The details are specific to individual implementations, but the following must be true:

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.