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

SessionState

interface SessionState (source)

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

Properties

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. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities
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.

Functions

Name Summary
createCopy abstract fun createCopy(id: String = this.id, 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.

Inheritors

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).