android-components / mozilla.components.browser.session

Package mozilla.components.browser.session

Types

Name Summary
Download data class Download
Value type that represents a Download.
LegacySessionManager class LegacySessionManager : Observable<Observer>
This class provides access to a centralized registry of all active sessions.
SelectionAwareSessionObserver abstract class SelectionAwareSessionObserver : Observer, Observer
This class is a combination of Session.Observer and SessionManager.Observer. It provides functionality to observe changes to a specified or selected session, and can automatically take care of switching over the observer in case a different session gets selected (see observeFixed and observeSelected).
Session class Session : Observable<Observer>
Value type that represents the state of a browser session. Changes can be observed.
SessionManager class SessionManager : Observable<Observer>
This class provides access to a centralized registry of all active sessions.

Functions

Name Summary
runWithSession fun SessionManager.runWithSession(sessionId: String?, block: SessionManager.(Session) -> Boolean): Boolean
Tries to find a session with the provided session ID and runs the block if found.
runWithSessionIdOrSelected fun SessionManager.runWithSessionIdOrSelected(sessionId: String?, block: SessionManager.(Session) -> Unit): Boolean
Tries to find a session with the provided session ID or uses the selected session and runs the block if found.