Interface AdblockWebView.EventsListener
- Enclosing class:
- AdblockWebView
public static interface AdblockWebView.EventsListener
Listener for ad blocking related events.
However, this interface may not be in use if Adblock Plus is disabled.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAdblockWebView.EventsListener.AllowlistedResourceInfoImmutable data-class containing an auxiliary information about allowlisted resource.static classAdblockWebView.EventsListener.AllowlistReasonAllowlisting reason:static classAdblockWebView.EventsListener.BlockedResourceInfoImmutable data-class containing an auxiliary information about blocked resource.static classAdblockWebView.EventsListener.ResourceInfoImmutable data-class containing an auxiliary information about resource event. -
Method Summary
Modifier and Type Method Description voidonNavigation()"Navigation" event.voidonResourceLoadingAllowlisted(AdblockWebView.EventsListener.AllowlistedResourceInfo info)"Resource loading allowlisted" event.voidonResourceLoadingBlocked(AdblockWebView.EventsListener.BlockedResourceInfo info)"Resource loading blocked" event.
-
Method Details
-
onResourceLoadingBlocked
"Resource loading blocked" event. This method can be called on a background thread. It should not block the thread for too long as it slows down resource loading.- Parameters:
info- contains auxiliary information about a blocked resource.
-
onResourceLoadingAllowlisted
"Resource loading allowlisted" event. This method can be called on a background thread. It should not block the thread for too long as it slows down resource loading.- Parameters:
info- contains auxiliary information about a blocked resource.