index.md 11.9 KB
Newer Older
1
2
3
4
[android-components](../../../index.md) / [mozilla.components.browser.session](../../index.md) / [Session](../index.md) / [Observer](./index.md)

# Observer

MickeyMoz's avatar
MickeyMoz committed
5
`interface Observer` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/session/src/main/java/mozilla/components/browser/session/Session.kt#L70)
6
7
8
9
10
11
12
13
14
15

Interface to be implemented by classes that want to observe a session.

### Functions

| Name | Summary |
|---|---|
| [onAppPermissionRequested](on-app-permission-requested.md) | `open fun onAppPermissionRequested(session: `[`Session`](../index.md)`, permissionRequest: `[`PermissionRequest`](../../../mozilla.components.concept.engine.permission/-permission-request/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [onCloseWindowRequested](on-close-window-requested.md) | `open fun onCloseWindowRequested(session: `[`Session`](../index.md)`, windowRequest: `[`WindowRequest`](../../../mozilla.components.concept.engine.window/-window-request/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [onContentPermissionRequested](on-content-permission-requested.md) | `open fun onContentPermissionRequested(session: `[`Session`](../index.md)`, permissionRequest: `[`PermissionRequest`](../../../mozilla.components.concept.engine.permission/-permission-request/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
MickeyMoz's avatar
MickeyMoz committed
16
| [onCrashStateChanged](on-crash-state-changed.md) | `open fun onCrashStateChanged(session: `[`Session`](../index.md)`, crashed: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
17
| [onCustomTabConfigChanged](on-custom-tab-config-changed.md) | `open fun onCustomTabConfigChanged(session: `[`Session`](../index.md)`, customTabConfig: `[`CustomTabConfig`](../../../mozilla.components.browser.state.state/-custom-tab-config/index.md)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
18
19
20
21
| [onDesktopModeChanged](on-desktop-mode-changed.md) | `open fun onDesktopModeChanged(session: `[`Session`](../index.md)`, enabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onDownload](on-download.md) | `open fun onDownload(session: `[`Session`](../index.md)`, download: `[`Download`](../../-download/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [onFindResult](on-find-result.md) | `open fun onFindResult(session: `[`Session`](../index.md)`, result: `[`FindResult`](../-find-result/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onFullScreenChanged](on-full-screen-changed.md) | `open fun onFullScreenChanged(session: `[`Session`](../index.md)`, enabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
22
| [onIconChanged](on-icon-changed.md) | `open fun onIconChanged(session: `[`Session`](../index.md)`, icon: <ERROR CLASS>?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
23
| [onLoadRequest](on-load-request.md) | `open fun onLoadRequest(session: `[`Session`](../index.md)`, url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, triggeredByRedirect: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, triggeredByWebContent: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
24
25
| [onLoadingStateChanged](on-loading-state-changed.md) | `open fun onLoadingStateChanged(session: `[`Session`](../index.md)`, loading: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onLongPress](on-long-press.md) | `open fun onLongPress(session: `[`Session`](../index.md)`, hitResult: `[`HitResult`](../../../mozilla.components.concept.engine/-hit-result/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
MickeyMoz's avatar
MickeyMoz committed
26
27
| [onMediaAdded](on-media-added.md) | `open fun onMediaAdded(session: `[`Session`](../index.md)`, media: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Media`](../../../mozilla.components.concept.engine.media/-media/index.md)`>, added: `[`Media`](../../../mozilla.components.concept.engine.media/-media/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onMediaRemoved](on-media-removed.md) | `open fun onMediaRemoved(session: `[`Session`](../index.md)`, media: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Media`](../../../mozilla.components.concept.engine.media/-media/index.md)`>, removed: `[`Media`](../../../mozilla.components.concept.engine.media/-media/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
28
29
30
31
| [onNavigationStateChanged](on-navigation-state-changed.md) | `open fun onNavigationStateChanged(session: `[`Session`](../index.md)`, canGoBack: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, canGoForward: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onOpenWindowRequested](on-open-window-requested.md) | `open fun onOpenWindowRequested(session: `[`Session`](../index.md)`, windowRequest: `[`WindowRequest`](../../../mozilla.components.concept.engine.window/-window-request/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [onProgress](on-progress.md) | `open fun onProgress(session: `[`Session`](../index.md)`, progress: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onPromptRequested](on-prompt-requested.md) | `open fun onPromptRequested(session: `[`Session`](../index.md)`, promptRequest: `[`PromptRequest`](../../../mozilla.components.concept.engine.prompt/-prompt-request/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
MickeyMoz's avatar
MickeyMoz committed
32
| [onReaderModeChanged](on-reader-mode-changed.md) | `open fun onReaderModeChanged(session: `[`Session`](../index.md)`, enabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
33
| [onReaderableStateUpdated](on-readerable-state-updated.md) | `open fun onReaderableStateUpdated(session: `[`Session`](../index.md)`, readerable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
34
| [onRecordingDevicesChanged](on-recording-devices-changed.md) | `open fun onRecordingDevicesChanged(session: `[`Session`](../index.md)`, devices: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`RecordingDevice`](../../../mozilla.components.concept.engine.media/-recording-device/index.md)`>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
35
36
| [onSearch](on-search.md) | `open fun onSearch(session: `[`Session`](../index.md)`, searchTerms: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [onSecurityChanged](on-security-changed.md) | `open fun onSecurityChanged(session: `[`Session`](../index.md)`, securityInfo: `[`SecurityInfo`](../-security-info/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
37
| [onThumbnailChanged](on-thumbnail-changed.md) | `open fun onThumbnailChanged(session: `[`Session`](../index.md)`, bitmap: <ERROR CLASS>?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
38
| [onTitleChanged](on-title-changed.md) | `open fun onTitleChanged(session: `[`Session`](../index.md)`, title: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
39
| [onTrackerBlocked](on-tracker-blocked.md) | `open fun onTrackerBlocked(session: `[`Session`](../index.md)`, tracker: `[`Tracker`](../../../mozilla.components.concept.engine.content.blocking/-tracker/index.md)`, all: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Tracker`](../../../mozilla.components.concept.engine.content.blocking/-tracker/index.md)`>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
40
| [onTrackerBlockingEnabledChanged](on-tracker-blocking-enabled-changed.md) | `open fun onTrackerBlockingEnabledChanged(session: `[`Session`](../index.md)`, blockingEnabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
41
| [onTrackerLoaded](on-tracker-loaded.md) | `open fun onTrackerLoaded(session: `[`Session`](../index.md)`, tracker: `[`Tracker`](../../../mozilla.components.concept.engine.content.blocking/-tracker/index.md)`, all: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Tracker`](../../../mozilla.components.concept.engine.content.blocking/-tracker/index.md)`>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
42
| [onUrlChanged](on-url-changed.md) | `open fun onUrlChanged(session: `[`Session`](../index.md)`, url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
MickeyMoz's avatar
MickeyMoz committed
43
| [onWebAppManifestChanged](on-web-app-manifest-changed.md) | `open fun onWebAppManifestChanged(session: `[`Session`](../index.md)`, manifest: `[`WebAppManifest`](../../../mozilla.components.concept.engine.manifest/-web-app-manifest/index.md)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
44
45
46
47
48

### Inheritors

| Name | Summary |
|---|---|
MickeyMoz's avatar
MickeyMoz committed
49
| [Observer](../../../mozilla.components.browser.session.utils/-all-sessions-observer/-observer/index.md) | `interface Observer : `[`Observer`](./index.md) |
50
51
| [SelectionAwareSessionObserver](../../-selection-aware-session-observer/index.md) | `abstract class SelectionAwareSessionObserver : `[`Observer`](../../-session-manager/-observer/index.md)`, `[`Observer`](./index.md)<br>This class is a combination of [Session.Observer](./index.md) and [SessionManager.Observer](../../-session-manager/-observer/index.md). 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](../../-selection-aware-session-observer/observe-fixed.md) and [observeSelected](../../-selection-aware-session-observer/observe-selected.md)). |
| [TabViewHolder](../../../mozilla.components.browser.tabstray/-tab-view-holder/index.md) | `class TabViewHolder : ViewHolder, `[`Observer`](./index.md)<br>A RecyclerView ViewHolder implementation for "tab" items. |
MickeyMoz's avatar
MickeyMoz committed
52
| [WebAppHideToolbarFeature](../../../mozilla.components.feature.pwa.feature/-web-app-hide-toolbar-feature/index.md) | `class WebAppHideToolbarFeature : `[`Observer`](./index.md)`, `[`LifecycleAwareFeature`](../../../mozilla.components.support.base.feature/-lifecycle-aware-feature/index.md)<br>Hides a custom tab toolbar for Progressive Web Apps and Trusted Web Activities. |