From 83ab7646c12136a8922a6754fd75ef3dca001346 Mon Sep 17 00:00:00 2001 From: ekager Date: Thu, 30 Apr 2020 14:56:01 -0700 Subject: [PATCH] For #7602 - Integrate media fullscreen orientation feature --- .../org/mozilla/fenix/browser/BaseBrowserFragment.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt index 359fd514a..9a3d51f34 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -45,6 +45,7 @@ import mozilla.components.feature.downloads.AbstractFetchDownloadService import mozilla.components.feature.downloads.DownloadsFeature import mozilla.components.feature.downloads.manager.FetchDownloadManager import mozilla.components.feature.intent.ext.EXTRA_SESSION_ID +import mozilla.components.feature.media.fullscreen.MediaFullscreenOrientationFeature import mozilla.components.feature.prompts.PromptFeature import mozilla.components.feature.prompts.share.ShareDelegate import mozilla.components.feature.readerview.ReaderViewFeature @@ -128,6 +129,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session private val swipeRefreshFeature = ViewBoundFeatureWrapper() private val webchannelIntegration = ViewBoundFeatureWrapper() private val sitePermissionWifiIntegration = ViewBoundFeatureWrapper() + private var fullScreenMediaFeature = ViewBoundFeatureWrapper() private var pipFeature: PictureInPictureFeature? = null var customTabSessionId: String? = null @@ -261,6 +263,15 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session view = view ) + fullScreenMediaFeature.set( + feature = MediaFullscreenOrientationFeature( + requireActivity(), + context.components.core.store + ), + owner = this, + view = view + ) + val downloadFeature = DownloadsFeature( context.applicationContext, store = store,