You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
Kotlin
43 lines
1.3 KiB
Kotlin
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
package org.mozilla.fenix.components
|
|
|
|
import android.content.Context
|
|
import mozilla.components.browser.session.SessionManager
|
|
import mozilla.components.feature.intent.IntentProcessor
|
|
import mozilla.components.feature.search.SearchUseCases
|
|
import mozilla.components.feature.session.SessionUseCases
|
|
import org.mozilla.fenix.test.Mockable
|
|
|
|
/**
|
|
* Component group for miscellaneous components.
|
|
*/
|
|
@Mockable
|
|
class Utilities(
|
|
private val context: Context,
|
|
private val sessionManager: SessionManager,
|
|
private val sessionUseCases: SessionUseCases,
|
|
private val searchUseCases: SearchUseCases
|
|
) {
|
|
/**
|
|
* Provides intent processing functionality for CustomTab, ACTION_VIEW
|
|
* and ACTION_SEND intents.
|
|
*/
|
|
val intentProcessor by lazy {
|
|
IntentProcessor(sessionUseCases, sessionManager, searchUseCases, context)
|
|
}
|
|
|
|
val privateIntentProcessor by lazy {
|
|
IntentProcessor(sessionUseCases, sessionManager, searchUseCases, context, isPrivate = true)
|
|
}
|
|
|
|
/**
|
|
* Provides notification functionality, manages notification channels.
|
|
*/
|
|
val notificationManager by lazy {
|
|
NotificationManager(context)
|
|
}
|
|
}
|