android-components / mozilla.components.feature.toolbar / ToolbarPresenter

ToolbarPresenter

class ToolbarPresenter : SelectionAwareSessionObserver (source)

Presenter implementation for a toolbar implementation in order to update the toolbar whenever the state of the selected session changes.

Constructors

<init>

ToolbarPresenter(toolbar: Toolbar, sessionManager: SessionManager, sessionId: String? = null)

Presenter implementation for a toolbar implementation in order to update the toolbar whenever the state of the selected session changes.

Inherited Properties

activeSession

open var activeSession: Session?

the currently observed session

Functions

onProgress

fun onProgress(session: Session, progress: Int): Unit

onSearch

fun onSearch(session: Session, searchTerms: String): Unit

onSecurityChanged

fun onSecurityChanged(session: Session, securityInfo: SecurityInfo): Unit

onSessionSelected

fun onSessionSelected(session: Session): Unit

A new session has been selected: Update toolbar to display data of new session.

onUrlChanged

fun onUrlChanged(session: Session, url: String): Unit

start

fun start(): Unit

Start presenter: Display data in toolbar.

Inherited Functions

observeFixed

fun observeFixed(session: Session): Unit

Starts observing changes to the specified session.

observeSelected

fun observeSelected(): Unit

Starts observing changes to the selected session (see SessionManager.selectedSession). If a different session is selected the observer will automatically be switched over and only notified of changes to the newly selected session.

stop

open fun stop(): Unit

Stops the observer.