index.md 10.1 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#L82)
6
7
8
9
10
11
12
13
14

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) |
| [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
15
| [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
16
| [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) |
17
18
19
| [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) |
| [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
20
21
| [onLaunchIntentRequest](on-launch-intent-request.md) | `open fun onLaunchIntentRequest(session: `[`Session`](../index.md)`, url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, appIntent: <ERROR CLASS>?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [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) |
22
23
| [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
24
| [onMetaViewportFitChanged](on-meta-viewport-fit-changed.md) | `open fun onMetaViewportFitChanged(session: `[`Session`](../index.md)`, layoutInDisplayCutoutMode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
25
26
| [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) |
| [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) |
MickeyMoz's avatar
MickeyMoz committed
27
| [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) |
28
29
| [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
30
| [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) |
31
| [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
32
| [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) |
33
| [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
34
| [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) |
35
| [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
36
| [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) |
37
38
39
40
41

### Inheritors

| Name | Summary |
|---|---|
MickeyMoz's avatar
MickeyMoz committed
42
| [CustomTabSessionTitleObserver](../../../mozilla.components.feature.customtabs.feature/-custom-tab-session-title-observer/index.md) | `class CustomTabSessionTitleObserver : `[`Observer`](./index.md)<br>Sets the title of the custom tab toolbar based on the session title and URL. |
MickeyMoz's avatar
MickeyMoz committed
43
| [ManifestUpdateFeature](../../../mozilla.components.feature.pwa.feature/-manifest-update-feature/index.md) | `class ManifestUpdateFeature : `[`Observer`](./index.md)`, `[`LifecycleAwareFeature`](../../../mozilla.components.support.base.feature/-lifecycle-aware-feature/index.md)<br>Feature used to update the existing web app manifest and web app shortcut. |
MickeyMoz's avatar
MickeyMoz committed
44
| [Observer](../../../mozilla.components.browser.session.utils/-all-sessions-observer/-observer/index.md) | `interface Observer : `[`Observer`](./index.md) |
45
| [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)). |
MickeyMoz's avatar
MickeyMoz committed
46
| [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. |