Package org.mozilla.geckoview
Interface ContentBlocking.Delegate
- Enclosing class:
- ContentBlocking
public static interface ContentBlocking.Delegate
GeckoSession applications implement this interface to handle content blocking events.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onContentBlocked
(GeckoSession session, ContentBlocking.BlockEvent event) A content element has been blocked from loading.default void
onContentLoaded
(GeckoSession session, ContentBlocking.BlockEvent event) A content element that could be blocked has been loaded.
-
Method Details
-
onContentBlocked
@UiThread default void onContentBlocked(@NonNull GeckoSession session, @NonNull ContentBlocking.BlockEvent event) A content element has been blocked from loading. Set blocked element categories viaGeckoRuntimeSettings
and enable content blocking viaGeckoSessionSettings
.- Parameters:
session
- The GeckoSession that initiated the callback.event
- TheContentBlocking.BlockEvent
details.
-
onContentLoaded
@UiThread default void onContentLoaded(@NonNull GeckoSession session, @NonNull ContentBlocking.BlockEvent event) A content element that could be blocked has been loaded.- Parameters:
session
- The GeckoSession that initiated the callback.event
- TheContentBlocking.BlockEvent
details.
-