From 1df7f95117b91fb9ab5679a85253dd326c7afc0c Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Thu, 16 Apr 2026 03:52:27 +0200 Subject: [PATCH] support copy image --- .../BaseBrowserFragment.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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,