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

GeckoEngineSession

class GeckoEngineSession : CoroutineScope, EngineSession (source)

Gecko-based EngineSession implementation.

Constructors

| Name | Summary | |—|—| | <init> | GeckoEngineSession(runtime: GeckoRuntime, privateMode: Boolean = false, defaultSettings: Settings? = null, geckoSessionProvider: () -> GeckoSession = { val settings = GeckoSessionSettings.Builder() .usePrivateMode(privateMode) .build() GeckoSession(settings) }, context: CoroutineContext = Dispatchers.IO, openGeckoSession: Boolean = true)
GeckoEngineSession(runtime: GeckoRuntime, privateMode: Boolean = false, defaultSettings: Settings? = null, geckoSessionProvider: () -> GeckoSession = { val settings = GeckoSessionSettings.Builder() .usePrivateMode(privateMode) .build() GeckoSession(settings) }, context: CoroutineContext = Dispatchers.IO)
Gecko-based EngineSession implementation. |

Properties

Name Summary
coroutineContext val coroutineContext: CoroutineContext
settings val settings: Settings
See EngineSession.settings

Functions

Name Summary
clearFindMatches fun clearFindMatches(): Unit
See EngineSession.clearFindMatches
close fun close(): Unit
See EngineSession.close.
disableTrackingProtection fun disableTrackingProtection(): Unit
See EngineSession.disableTrackingProtection
enableTrackingProtection fun enableTrackingProtection(policy: TrackingProtectionPolicy): Unit
See EngineSession.enableTrackingProtection
exitFullScreenMode fun exitFullScreenMode(): Unit
See EngineSession.exitFullScreenMode
findAll fun findAll(text: String): Unit
See EngineSession.findAll
findNext fun findNext(forward: Boolean): Unit
See EngineSession.findNext
goBack fun goBack(): Unit
See EngineSession.goBack
goForward fun goForward(): Unit
See EngineSession.goForward
handleLongClick fun handleLongClick(elementSrc: String?, elementType: Int, uri: String? = null, title: String? = null): HitResult?
loadData fun loadData(data: String, mimeType: String, encoding: String): Unit
See EngineSession.loadData
loadUrl fun loadUrl(url: String, flags: LoadUrlFlags): Unit
See EngineSession.loadUrl
recoverFromCrash fun recoverFromCrash(): Boolean
See EngineSession.recoverFromCrash
reload fun reload(): Unit
See EngineSession.reload
restoreState fun restoreState(state: EngineSessionState): Unit
See EngineSession.restoreState
saveState fun saveState(): EngineSessionState
See EngineSession.saveState
stopLoading fun stopLoading(): Unit
See EngineSession.stopLoading
toggleDesktopMode fun toggleDesktopMode(enable: Boolean, reload: Boolean): Unit
See EngineSession.settings

Inherited Functions

Name Summary
clearData open fun clearData(data: BrowsingData = Engine.BrowsingData.all(), host: String? = null, onSuccess: () -> Unit = { }, onError: (Throwable) -> Unit = { }): Unit
Clears browsing data stored by the engine.

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.