diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/BaseBrowserFragment.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/BaseBrowserFragment.kt index 9beee165..549fcefd 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/BaseBrowserFragment.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/BaseBrowserFragment.kt @@ -42,6 +42,7 @@ import mozilla.components.feature.accounts.FxaWebChannelFeature import mozilla.components.feature.app.links.AppLinksFeature import mozilla.components.feature.downloads.DownloadsFeature import mozilla.components.feature.downloads.manager.FetchDownloadManager +import mozilla.components.feature.downloads.temporary.CopyDownloadFeature import mozilla.components.feature.downloads.temporary.ShareResourceFeature import mozilla.components.feature.media.fullscreen.MediaSessionFullscreenFeature import mozilla.components.feature.privatemode.feature.SecureWindowFeature @@ -75,6 +76,7 @@ import mozilla.components.support.webextensions.WebExtensionPopupObserver abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, ActivityResultHandler { protected val sessionFeature = ViewBoundFeatureWrapper() private val shareResourceFeature = ViewBoundFeatureWrapper() + private val copyDownloadFeature = ViewBoundFeatureWrapper() private val downloadsFeature = ViewBoundFeatureWrapper() private val appLinksFeature = ViewBoundFeatureWrapper() private val promptFeature = ViewBoundFeatureWrapper() @@ -277,6 +279,18 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit view = view, ) + copyDownloadFeature.set( + CopyDownloadFeature( + context = components.profileApplicationContext, + httpClient = components.core.client, + store = components.core.store, + tabId = sessionId, + onCopyConfirmation = {}, + ), + owner = this, + view = view, + ) + downloadsFeature.set( feature = DownloadsFeature( components.profileApplicationContext,