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

# ToolbarPresenter

`class ToolbarPresenter : Observer, Observer` (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.

### Functions

onProgress | `fun onProgress(session: Session, progress: Int): Unit`
onSearch | `fun onSearch(session: Session, searchTerms: String): 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.
stop | `fun stop(): Unit` Stop presenter from updating the view.

### Inherited Functions

onAllSessionsRemoved | `open fun onAllSessionsRemoved(): Unit` All sessions have been removed. Note that this will callback will be invoked whenever removeAll() or removeSessions have been called on the SessionManager. This callback will NOT be invoked when just the last session has been removed by calling remove() on the SessionManager.
onCustomTabConfigChanged | `open fun onCustomTabConfigChanged(session: Session, customTabConfig: CustomTabConfig?): Unit`
onDesktopModeChanged | `open fun onDesktopModeChanged(session: Session, enabled: Boolean): Unit`
onDownload | `open fun onDownload(session: Session, download: Download): Boolean`
onFindResult | `open fun onFindResult(session: Session, result: FindResult): Unit`
onFullScreenChanged | `open fun onFullScreenChanged(session: Session, enabled: Boolean): Unit`
onLoadingStateChanged | `open fun onLoadingStateChanged(session: Session, loading: Boolean): Unit`
onLongPress | `open fun onLongPress(session: Session, hitResult: HitResult): Boolean`
onNavigationStateChanged | `open fun onNavigationStateChanged(session: Session, canGoBack: Boolean, canGoForward: Boolean): Unit`
onSecurityChanged | `open fun onSecurityChanged(session: Session, securityInfo: SecurityInfo): Unit`
onSessionAdded | `open fun onSessionAdded(session: Session): Unit` The given session has been added.
onSessionRemoved | `open fun onSessionRemoved(session: Session): Unit` The given session has been removed.
onThumbnailChanged | `open fun onThumbnailChanged(session: Session, bitmap: Bitmap?): Unit`
onTitleChanged | `open fun onTitleChanged(session: Session, title: String): Unit`
onTrackerBlocked | `open fun onTrackerBlocked(session: Session, blocked: String, all: List<String>): Unit`
onTrackerBlockingEnabledChanged | `open fun onTrackerBlockingEnabledChanged(session: Session, blockingEnabled: Boolean): Unit`