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, contextId: String? = null, geckoSessionProvider: () -> GeckoSession = { val settings = GeckoSessionSettings.Builder() .usePrivateMode(privateMode) .contextId(contextId) .build() GeckoSession(settings) }, context: CoroutineContext = Dispatchers.IO, openGeckoSession: Boolean = true)
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, parent: EngineSession?, flags: LoadUrlFlags, additionalHeaders: Map<String, String>?): Unit
See EngineSession.loadUrl
markActiveForWebExtensions fun markActiveForWebExtensions(active: Boolean): Unit
See EngineSession.markActiveForWebExtensions.
recoverFromCrash fun recoverFromCrash(): Boolean
See EngineSession.recoverFromCrash
reload fun reload(): Unit
See EngineSession.reload
restoreState fun restoreState(state: EngineSessionState): Boolean
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

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.
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.