[android-components](../../index.md) / [mozilla.components.browser.state.state](../index.md) / [CustomTabSessionState](./index.md)

# CustomTabSessionState

`data class CustomTabSessionState : `[`SessionState`](../-session-state/index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/state/src/main/java/mozilla/components/browser/state/state/CustomTabSessionState.kt#L20)

Value type that represents the state of a Custom Tab.

### Constructors

| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | `CustomTabSessionState(id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = UUID.randomUUID().toString(), content: `[`ContentState`](../-content-state/index.md)`, trackingProtection: `[`TrackingProtectionState`](../-tracking-protection-state/index.md)` = TrackingProtectionState(), config: `[`CustomTabConfig`](../-custom-tab-config/index.md)`, engineState: `[`EngineState`](../-engine-state/index.md)` = EngineState(), extensionState: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`WebExtensionState`](../-web-extension-state/index.md)`> = emptyMap(), contextId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null, source: `[`Source`](../-session-state/-source/index.md)` = SessionState.Source.CUSTOM_TAB, crashed: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)`<br>Value type that represents the state of a Custom Tab. |

### Properties

| Name | Summary |
|---|---|
| [config](config.md) | `val config: `[`CustomTabConfig`](../-custom-tab-config/index.md)<br>the [CustomTabConfig](../-custom-tab-config/index.md) used to create this custom tab. |
| [content](content.md) | `val content: `[`ContentState`](../-content-state/index.md)<br>the [ContentState](../-content-state/index.md) of this custom tab. |
| [contextId](context-id.md) | `val contextId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`<br>the session context ID of this custom tab. |
| [crashed](crashed.md) | `val crashed: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Whether this session has crashed. In conjunction with a `concept-engine` implementation that uses a multi-process architecture, single sessions can crash without crashing the whole app. A crashed session may still be operational (since the underlying engine implementation has recovered its content process), but further action may be needed to restore the last state before the session has crashed (if desired). |
| [engineState](engine-state.md) | `val engineState: `[`EngineState`](../-engine-state/index.md)<br>the [EngineState](../-engine-state/index.md) of this session. |
| [extensionState](extension-state.md) | `val extensionState: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`WebExtensionState`](../-web-extension-state/index.md)`>`<br>a map of web extension ids and extensions, that contains the overridden values for this tab. |
| [id](id.md) | `val id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>the ID of this custom tab and session. |
| [source](source.md) | `val source: `[`Source`](../-session-state/-source/index.md)<br>the [Source](../-session-state/-source/index.md) of this session to describe how and why it was created. |
| [trackingProtection](tracking-protection.md) | `val trackingProtection: `[`TrackingProtectionState`](../-tracking-protection-state/index.md)<br>the [TrackingProtectionState](../-tracking-protection-state/index.md) of this custom tab. |

### Functions

| Name | Summary |
|---|---|
| [createCopy](create-copy.md) | `fun createCopy(id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, content: `[`ContentState`](../-content-state/index.md)`, trackingProtection: `[`TrackingProtectionState`](../-tracking-protection-state/index.md)`, engineState: `[`EngineState`](../-engine-state/index.md)`, extensionState: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`WebExtensionState`](../-web-extension-state/index.md)`>, contextId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, crashed: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`CustomTabSessionState`](./index.md)<br>Copy the class and override some parameters. |

### Extension Functions

| Name | Summary |
|---|---|
| [createCustomTabMenuCandidates](../../mozilla.components.feature.customtabs.menu/create-custom-tab-menu-candidates.md) | `fun `[`CustomTabSessionState`](./index.md)`.createCustomTabMenuCandidates(context: <ERROR CLASS>): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`TextMenuCandidate`](../../mozilla.components.concept.menu.candidate/-text-menu-candidate/index.md)`>`<br>Build menu items displayed when the 3-dot overflow menu is opened. These items are provided by the app that creates the custom tab, and should be inserted alongside menu items created by the browser. |
| [loadResourceAsString](../../mozilla.components.support.test.file/kotlin.-any/load-resource-as-string.md) | `fun `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`.loadResourceAsString(path: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Loads a file from the resources folder and returns its content as a string object. |
