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

CustomTabSessionState

data class CustomTabSessionState : SessionState (source)

Value type that represents the state of a Custom Tab.

Constructors

Name Summary
<init> CustomTabSessionState(id: String = UUID.randomUUID().toString(), content: ContentState, trackingProtection: TrackingProtectionState = TrackingProtectionState(), config: CustomTabConfig, engineState: EngineState = EngineState(), extensionState: Map<String, WebExtensionState> = emptyMap(), contextId: String? = null)
Value type that represents the state of a Custom Tab.

Properties

Name Summary
config val config: CustomTabConfig
the CustomTabConfig used to create this custom tab.
content val content: ContentState
the ContentState of this custom tab.
contextId val contextId: String?
the session context ID of this custom tab.
engineState val engineState: EngineState
the EngineState of this session.
extensionState val extensionState: Map<String, WebExtensionState>
a map of web extension ids and extensions, that contains the overridden values for this tab.
id val id: String
the ID of this custom tab and session.
trackingProtection val trackingProtection: TrackingProtectionState
the TrackingProtectionState of this custom tab.

Functions

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