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


data class ContentState (source)

Value type that represents the state of the content within a SessionState.


Name Summary
<init> ContentState(url: String, private: Boolean = false, title: String = "", progress: Int = 0, loading: Boolean = false, searchTerms: String = "", securityInfo: SecurityInfoState = SecurityInfoState(), thumbnail: <ERROR CLASS>? = null, icon: <ERROR CLASS>? = null, download: DownloadState? = null, hitResult: HitResult? = null, promptRequest: PromptRequest? = null, findResults: List<FindResultState> = emptyList(), windowRequest: WindowRequest? = null, searchRequest: SearchRequest? = null, fullScreen: Boolean = false, layoutInDisplayCutoutMode: Int = 0, canGoBack: Boolean = false, canGoForward: Boolean = false, webAppManifest: WebAppManifest? = null, firstContentfulPaint: Boolean = false, history: HistoryState = HistoryState(), pictureInPictureEnabled: Boolean = false)
Value type that represents the state of the content within a SessionState.


Name Summary
canGoBack val canGoBack: Boolean
whether or not there’s an history item to navigate back to.
canGoForward val canGoForward: Boolean
whether or not there’s an history item to navigate forward to.
download val download: DownloadState?
Last unhandled download request.
findResults val findResults: List<FindResultState>
the list of results of the latest “find in page” operation.
firstContentfulPaint val firstContentfulPaint: Boolean
whether or not the first contentful paint has happened.
fullScreen val fullScreen: Boolean
true if the page is full screen, false if not.
history val history: HistoryState
hitResult val hitResult: HitResult?
the target of the latest long click operation.
icon val icon: <ERROR CLASS>?
the icon of the page currently loaded by this session.
layoutInDisplayCutoutMode val layoutInDisplayCutoutMode: Int
the display layout cutout mode state.
loading val loading: Boolean
pictureInPictureEnabled val pictureInPictureEnabled: Boolean
True if the session is being displayed in PIP mode.
private val private: Boolean
whether or not the session is private.
progress val progress: Int
the loading progress of the current page.
promptRequest val promptRequest: PromptRequest?
the last received PromptRequest.
searchRequest val searchRequest: SearchRequest?
the last received SearchRequest
searchTerms val searchTerms: String
the last used search terms, or an empty string if no search was executed for this session.
securityInfo val securityInfo: SecurityInfoState
the security information as SecurityInfoState, describing whether or not the this session is for a secure URL, as well as the host and SSL certificate authority.
thumbnail val thumbnail: <ERROR CLASS>?
the last generated Bitmap of this session’s content, to be used as a preview in e.g. a tab switcher.
title val title: String
the title of the current page.
url val url: String
the loading or loaded URL.
webAppManifest val webAppManifest: WebAppManifest?
the Web App Manifest for the currently visited page (or null).
windowRequest val windowRequest: WindowRequest?
the last received WindowRequest.

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.