android-components / mozilla.components.feature.pwa.feature / ManifestUpdateFeature

ManifestUpdateFeature

class ManifestUpdateFeature : Observer, LifecycleAwareFeature (source)

Feature used to update the existing web app manifest and web app shortcut.

Parameters

shortcutManager - Shortcut manager used to update pinned shortcuts.

storage - Manifest storage used to have updated manifests.

sessionId - ID of the web app session to observe.

initialManifest - Loaded manifest for the current web app.

Constructors

Name Summary
<init> ManifestUpdateFeature(applicationContext: <ERROR CLASS>, sessionManager: SessionManager, shortcutManager: WebAppShortcutManager, storage: ManifestStorage, sessionId: String, initialManifest: WebAppManifest)
Feature used to update the existing web app manifest and web app shortcut.

Functions

Name Summary
onWebAppManifestChanged fun onWebAppManifestChanged(session: Session, manifest: WebAppManifest?): Unit
When the manifest is changed, compare it to the existing manifest. If it is different, update the disk and shortcut. Ignore if called with a null manifest or a manifest with a different start URL.
start fun start(): Unit
stop fun stop(): Unit

Inherited Functions

Name Summary
onAppPermissionRequested open fun onAppPermissionRequested(session: Session, permissionRequest: PermissionRequest): Boolean
onContentPermissionRequested open fun onContentPermissionRequested(session: Session, permissionRequest: PermissionRequest): Boolean
onCrashStateChanged open fun onCrashStateChanged(session: Session, crashed: Boolean): Unit
onCustomTabConfigChanged open fun onCustomTabConfigChanged(session: Session, customTabConfig: CustomTabConfig?): Unit
onDesktopModeChanged open fun onDesktopModeChanged(session: Session, enabled: Boolean): Unit
onFindResult open fun onFindResult(session: Session, result: FindResult): Unit
onFullScreenChanged open fun onFullScreenChanged(session: Session, enabled: Boolean): Unit
onLaunchIntentRequest open fun onLaunchIntentRequest(session: Session, url: String, appIntent: <ERROR CLASS>?): Unit
onLoadRequest open fun onLoadRequest(session: Session, url: String, triggeredByRedirect: Boolean, triggeredByWebContent: Boolean): Unit
onLoadingStateChanged open fun onLoadingStateChanged(session: Session, loading: Boolean): Unit
onLongPress open fun onLongPress(session: Session, hitResult: HitResult): Boolean
onMediaAdded open fun onMediaAdded(session: Session, media: List<Media>, added: Media): Unit
onMediaRemoved open fun onMediaRemoved(session: Session, media: List<Media>, removed: Media): Unit
onNavigationStateChanged open fun onNavigationStateChanged(session: Session, canGoBack: Boolean, canGoForward: Boolean): Unit
onProgress open fun onProgress(session: Session, progress: Int): Unit
onReaderModeChanged open fun onReaderModeChanged(session: Session, enabled: Boolean): Unit
onReaderableStateUpdated open fun onReaderableStateUpdated(session: Session, readerable: Boolean): Unit
onRecordingDevicesChanged open fun onRecordingDevicesChanged(session: Session, devices: List<RecordingDevice>): Unit
onSearch open fun onSearch(session: Session, searchTerms: String): Unit
onSecurityChanged open fun onSecurityChanged(session: Session, securityInfo: SecurityInfo): Unit
onThumbnailChanged open fun onThumbnailChanged(session: Session, bitmap: <ERROR CLASS>?): Unit
onTitleChanged open fun onTitleChanged(session: Session, title: String): Unit
onTrackerBlocked open fun onTrackerBlocked(session: Session, tracker: Tracker, all: List<Tracker>): Unit
onTrackerBlockingEnabledChanged open fun onTrackerBlockingEnabledChanged(session: Session, blockingEnabled: Boolean): Unit
onTrackerLoaded open fun onTrackerLoaded(session: Session, tracker: Tracker, all: List<Tracker>): Unit
onUrlChanged open fun onUrlChanged(session: Session, url: String): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.