|
|
|
@ -63,7 +63,8 @@ import mozilla.components.feature.contextmenu.ContextMenuCandidate
|
|
|
|
|
import mozilla.components.feature.contextmenu.ContextMenuFeature
|
|
|
|
|
import mozilla.components.feature.downloads.DownloadsFeature
|
|
|
|
|
import mozilla.components.feature.downloads.manager.FetchDownloadManager
|
|
|
|
|
import mozilla.components.feature.downloads.share.ShareDownloadFeature
|
|
|
|
|
import mozilla.components.feature.downloads.temporary.CopyDownloadFeature
|
|
|
|
|
import mozilla.components.feature.downloads.temporary.ShareDownloadFeature
|
|
|
|
|
import mozilla.components.feature.intent.ext.EXTRA_SESSION_ID
|
|
|
|
|
import mozilla.components.feature.media.fullscreen.MediaSessionFullscreenFeature
|
|
|
|
|
import mozilla.components.feature.privatemode.feature.SecureWindowFeature
|
|
|
|
@ -189,6 +190,7 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
private val contextMenuFeature = ViewBoundFeatureWrapper<ContextMenuFeature>()
|
|
|
|
|
private val downloadsFeature = ViewBoundFeatureWrapper<DownloadsFeature>()
|
|
|
|
|
private val shareDownloadsFeature = ViewBoundFeatureWrapper<ShareDownloadFeature>()
|
|
|
|
|
private val copyDownloadsFeature = ViewBoundFeatureWrapper<CopyDownloadFeature>()
|
|
|
|
|
private val appLinksFeature = ViewBoundFeatureWrapper<AppLinksFeature>()
|
|
|
|
|
private val promptsFeature = ViewBoundFeatureWrapper<PromptFeature>()
|
|
|
|
|
private val findInPageIntegration = ViewBoundFeatureWrapper<FindInPageIntegration>()
|
|
|
|
@ -487,6 +489,15 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
tabId = customTabSessionId,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val copyDownloadFeature = CopyDownloadFeature(
|
|
|
|
|
context = context.applicationContext,
|
|
|
|
|
httpClient = context.components.core.client,
|
|
|
|
|
store = store,
|
|
|
|
|
tabId = customTabSessionId,
|
|
|
|
|
snackbarParent = binding.dynamicSnackbarContainer,
|
|
|
|
|
snackbarDelegate = FenixSnackbarDelegate(binding.dynamicSnackbarContainer),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val downloadFeature = DownloadsFeature(
|
|
|
|
|
context.applicationContext,
|
|
|
|
|
store = store,
|
|
|
|
@ -595,6 +606,12 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
view = view,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
copyDownloadsFeature.set(
|
|
|
|
|
copyDownloadFeature,
|
|
|
|
|
owner = this,
|
|
|
|
|
view = view,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
downloadsFeature.set(
|
|
|
|
|
downloadFeature,
|
|
|
|
|
owner = this,
|
|
|
|
|