android-components / mozilla.components.browser.state.state / SessionState


interface SessionState (source)

Interface for states that contain a ContentState and can be accessed via an id.


Name Summary
content abstract val content: ContentState
the ContentState of this session.
contextId abstract val contextId: String?
the session context ID of the session. The session context ID specifies the contextual identity to use for the session’s cookie store.
engineState abstract val engineState: EngineState
the EngineState of this session.
extensionState abstract val extensionState: Map<String, WebExtensionState>
a map of extension id and web extension states specific to this SessionState.
id abstract val id: String
the unique id of the session.
trackingProtection abstract val trackingProtection: TrackingProtectionState
the TrackingProtectionState of this session.


Name Summary
createCopy abstract fun createCopy(id: String =, content: ContentState = this.content, trackingProtection: TrackingProtectionState = this.trackingProtection, engineState: EngineState = this.engineState, extensionState: Map<String, WebExtensionState> = this.extensionState, contextId: String? = this.contextId): SessionState
Copy the class and override some parameters.

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.


Name Summary
CustomTabSessionState data class CustomTabSessionState : SessionState
Value type that represents the state of a Custom Tab.
TabSessionState data class TabSessionState : SessionState
Value type that represents the state of a tab (private or normal).