Cefrium View State
Hoisted state for CefriumView, created with rememberCefriumViewState.
The underlying CefriumBrowser is owned by this state, NOT by the CefriumView composable. That lets the browser survive the composable being detached — e.g. when switching browser tabs the inactive tab keeps its page alive instead of reloading. The browser is released by close:
automatically when a state created via rememberCefriumViewState leaves composition (via RememberObserver);
explicitly by the caller for states constructed directly (e.g. one per tab, closed when the tab closes).
Properties
A pending context-menu request from the page, or null. When non-null, show your menu UI, call CefriumNavigator.contextMenuCommand with the chosen command id, then set this back to null to dismiss.
All downloads seen for this page, newest first, one DownloadEntry per download (updated in place as it progresses). Backed by Compose state, so a download list UI recomposes automatically. Cleared with clearDownloads.
Find-in-page: 1-based ordinal of the active match (0 = none).
Find-in-page: total matches for the current query (0 = none).
True while a page element is in HTML5 fullscreen.
The most recent download update (null until the first download).
Optional hook to decide asynchronously whether and where to save a download (e.g. an Android SAF "save as" picker). When set, it is called BEFORE the download starts; you MUST eventually call allow(path) (path null = the suggested location) or cancel() -- the download waits for one of them. When null (default), downloads auto-start to the suggested path, like a normal browser.
Optional per-download-event hook. Fired on the UI thread each time a download starts or updates (before downloads is a stable snapshot), so a host can post/refresh a system notification. The same DownloadEntry is also reflected in downloads. Set to null to stop receiving events.
Set when a renderer process for this page dies (an OEM low-memory kill or a crash). When non-null the page is now blank/dead -- show a reload affordance and reload (e.g. via CefriumNavigator.reload). Cleared automatically when the next load starts, so the affordance dismisses itself on recovery.
Functions
Cancel an in-progress download by its DownloadEntry.id.
Remove finished (complete or canceled) downloads from downloads.
Forward the hosting Activity's onActivityResult to this browser so the file picker (<input type=file>, File System Access), camera capture and other intent-for-result flows can deliver their result. Call this from your Activity's onActivityResult for every visible state. Returns true if the result was consumed.
Pause an in-progress download by its DownloadEntry.id.
Resume a paused download by its DownloadEntry.id.