File tree Expand file tree Collapse file tree
ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,24 +37,12 @@ import kotlinx.coroutines.flow.distinctUntilChanged
3737import kotlinx.coroutines.launch
3838import javax.inject.Inject
3939
40- /* *
41- * Decides whether to show the ad-blocking contingency bottom sheet and shows it. It is driven by
42- * [AdBlockingExtensionJsInjectorPlugin] on page load rather than being a [JsInjectorPlugin] itself,
43- * so that JS injection and UI concerns stay separated.
44- */
4540interface ContingencyMessageHandler {
4641 /* * Called on page load. Shows the contingency message if all conditions are met. */
4742 @UiThread
4843 fun onPageLoaded (webView : WebView , url : String? )
4944}
5045
51- /* *
52- * Shows a one-off bottom sheet informing the user that YouTube ad blocking is temporarily
53- * unavailable while ad-blocking contingency mode is active. Gated behind the
54- * [AdBlockingExtensionFeature.adBlockingUXImprovements] rollout flag. The message is shown only the
55- * first time the user reaches YouTube after contingency mode is enabled; the "shown" state is reset
56- * whenever contingency mode is disabled so it shows again next time it is enabled.
57- */
5846@SingleInstanceIn(AppScope ::class )
5947@ContributesBinding(scope = AppScope ::class , boundType = ContingencyMessageHandler ::class )
6048@ContributesMultibinding(scope = AppScope ::class , boundType = MainProcessLifecycleObserver ::class )
Original file line number Diff line number Diff line change @@ -22,12 +22,7 @@ import com.duckduckgo.di.scopes.AppScope
2222import com.squareup.anvil.annotations.ContributesBinding
2323import javax.inject.Inject
2424
25- /* *
26- * Shows and tracks the ad-blocking contingency bottom sheet, keeping the dialog/UI concern out of
27- * [ContingencyMessageHandler].
28- */
2925interface ContingencyMessageView {
30- /* * Shows the contingency bottom sheet using the given [webView]'s context. */
3126 @UiThread
3227 fun show (webView : WebView )
3328}
You can’t perform that action at this time.
0 commit comments