enable webauthn feature
This commit is contained in:
@@ -126,6 +126,7 @@ dependencies {
|
|||||||
implementation "org.mozilla.components:feature-sitepermissions:$mozillaComponentsVersion"
|
implementation "org.mozilla.components:feature-sitepermissions:$mozillaComponentsVersion"
|
||||||
implementation "org.mozilla.components:feature-webcompat:$mozillaComponentsVersion"
|
implementation "org.mozilla.components:feature-webcompat:$mozillaComponentsVersion"
|
||||||
implementation "org.mozilla.components:feature-webnotifications:$mozillaComponentsVersion"
|
implementation "org.mozilla.components:feature-webnotifications:$mozillaComponentsVersion"
|
||||||
|
implementation "org.mozilla.components:feature-webauthn:$mozillaComponentsVersion"
|
||||||
implementation "org.mozilla.components:ui-widgets:$mozillaComponentsVersion"
|
implementation "org.mozilla.components:ui-widgets:$mozillaComponentsVersion"
|
||||||
|
|
||||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.3.0'
|
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.3.0'
|
||||||
|
|||||||
+15
@@ -41,6 +41,7 @@ import mozilla.components.feature.session.SwipeRefreshFeature
|
|||||||
import mozilla.components.feature.sitepermissions.SitePermissionsFeature
|
import mozilla.components.feature.sitepermissions.SitePermissionsFeature
|
||||||
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
||||||
import mozilla.components.feature.sitepermissions.SitePermissionsRules.AutoplayAction
|
import mozilla.components.feature.sitepermissions.SitePermissionsRules.AutoplayAction
|
||||||
|
import mozilla.components.feature.webauthn.WebAuthnFeature
|
||||||
import mozilla.components.support.base.feature.ActivityResultHandler
|
import mozilla.components.support.base.feature.ActivityResultHandler
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
@@ -69,6 +70,8 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit
|
|||||||
private val mediaSessionFullscreenFeature =
|
private val mediaSessionFullscreenFeature =
|
||||||
ViewBoundFeatureWrapper<MediaSessionFullscreenFeature>()
|
ViewBoundFeatureWrapper<MediaSessionFullscreenFeature>()
|
||||||
|
|
||||||
|
private val webAuthnFeature = ViewBoundFeatureWrapper<WebAuthnFeature>()
|
||||||
|
|
||||||
private var pictureInPictureFeature: PictureInPictureFeature? = null
|
private var pictureInPictureFeature: PictureInPictureFeature? = null
|
||||||
|
|
||||||
private val sessionId: String?
|
private val sessionId: String?
|
||||||
@@ -88,6 +91,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit
|
|||||||
|
|
||||||
private val activityResultHandler: List<ViewBoundFeatureWrapper<*>> = listOf(
|
private val activityResultHandler: List<ViewBoundFeatureWrapper<*>> = listOf(
|
||||||
promptFeature,
|
promptFeature,
|
||||||
|
webAuthnFeature
|
||||||
)
|
)
|
||||||
|
|
||||||
protected abstract fun createEngine(components: Components) : EngineView
|
protected abstract fun createEngine(components: Components) : EngineView
|
||||||
@@ -299,6 +303,17 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit
|
|||||||
owner = this,
|
owner = this,
|
||||||
view = binding.root,
|
view = binding.root,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
webAuthnFeature.set(
|
||||||
|
feature = WebAuthnFeature(
|
||||||
|
engine = components.core.engine,
|
||||||
|
activity = requireActivity(),
|
||||||
|
exitFullScreen = components.useCases.sessionUseCases.exitFullscreen::invoke,
|
||||||
|
currentTab = { components.core.store.state.selectedTabId },
|
||||||
|
),
|
||||||
|
owner = this,
|
||||||
|
view = view
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun restartApp(context: Context) {
|
private fun restartApp(context: Context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user