abstract class SelectionAwareSessionObserver : Observer, Observer
(source)
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).
SelectionAwareSessionObserver(sessionManager: SessionManager)
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). |
open var activeSession: Session?
the currently observed session |
fun observeFixed(session: Session): Unit
Starts observing changes to the specified session. |
|
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. |
|
open fun onSessionSelected(session: Session): Unit
The selection has changed and the given session is now the selected session. |
|
open fun stop(): Unit
Stops the observer. |
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. |
|
open fun onCustomTabConfigChanged(session: Session, customTabConfig: CustomTabConfig?): Unit |
|
open fun onDesktopModeChanged(session: Session, enabled: Boolean): Unit |
|
open fun onDownload(session: Session, download: Download): Boolean |
|
open fun onFindResult(session: Session, result: FindResult): Unit |
|
open fun onFullScreenChanged(session: Session, enabled: Boolean): Unit |
|
open fun onLoadingStateChanged(session: Session, loading: Boolean): Unit |
|
open fun onLongPress(session: Session, hitResult: HitResult): Boolean |
|
open fun onNavigationStateChanged(: Session, : Boolean, : Boolean): Unit |
|
open fun onProgress(session: Session, progress: Int): Unit |
|
open fun onSearch(session: Session, searchTerms: String): Unit |
|
open fun onSecurityChanged(session: Session, securityInfo: SecurityInfo): Unit |
|
open fun onSessionAdded(session: Session): Unit
The given session has been added. |
|
open fun onSessionRemoved(session: Session): Unit
The given session has been removed. |
|
open fun onSessionsRestored(): Unit
Sessions have been restored via a snapshot. This callback is invoked at the end of the call to read, after every session in the snapshot was added, and appropriate session was selected. |
|
open fun onThumbnailChanged(session: Session, bitmap: Bitmap?): Unit |
|
open fun onTitleChanged(session: Session, title: String): Unit |
|
open fun onTrackerBlocked(session: Session, blocked: String, all: List<String>): Unit |
|
open fun onTrackerBlockingEnabledChanged(session: Session, blockingEnabled: Boolean): Unit |
|
open fun onUrlChanged(session: Session, url: String): Unit |
class DownloadsFeature : SelectionAwareSessionObserver
Feature implementation for proving download functionality for the selected session. It will subscribe to the selected session and will listening for downloads. |
|
class ToolbarPresenter : SelectionAwareSessionObserver
Presenter implementation for a toolbar implementation in order to update the toolbar whenever the state of the selected session changes. |