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


data class TabSessionState : SessionState (source)

Value type that represents the state of a tab (private or normal).


Name Summary
<init> TabSessionState(id: String = UUID.randomUUID().toString(), content: ContentState, trackingProtection: TrackingProtectionState = TrackingProtectionState(), engineState: EngineState = EngineState(), parentId: String? = null, extensionState: Map<String, WebExtensionState> = emptyMap(), readerState: ReaderState = ReaderState(), contextId: String? = null)
Value type that represents the state of a tab (private or normal).


Name Summary
content val content: ContentState
the ContentState of this tab.
contextId val contextId: String?
the session context ID of this tab.
engineState val engineState: EngineState
the EngineState of this session.
extensionState val extensionState: Map<String, WebExtensionState>
a map of web extension ids to extensions, that contains the overridden values for this tab.
id val id: String
the ID of this tab and session.
parentId val parentId: String?
the parent ID of this tab or null if this tab has no parent. The parent tab is usually the tab that initiated opening this tab (e.g. the user clicked a link with target=”_blank” or selected “open in new tab” or a “” was triggered).
readerState val readerState: ReaderState
the ReaderState of this tab.
trackingProtection val trackingProtection: TrackingProtectionState
the TrackingProtectionState of this tab.


Name Summary
createCopy fun createCopy(id: String, content: ContentState, trackingProtection: TrackingProtectionState, engineState: EngineState, extensionState: Map<String, WebExtensionState>, contextId: String?): TabSessionState
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.