public final class WebViewCounters
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
WebViewCounters.EventsListener
Listener for changing events.
|
| Constructor and Description |
|---|
WebViewCounters(WebViewCounters.EventsListener eventsListener)
Constructs an instance of Counters class.
|
| Modifier and Type | Method and Description |
|---|---|
static AdblockWebView.EventsListener |
bindAdblockWebView(WebViewCounters.EventsListener eventsListener)
A helper method for creation of AdblockWebView.EventsListener and binding it with
Counters.EventsListener.
|
void |
incrementAllowlisted()
Thread safe incrementation of the allowlisted counter.
|
void |
incrementBlocked()
Thread safe incrementation of the blocked counter.
|
void |
resetAllowlisted()
Thread safe resetting of the allowlisted counter.
|
void |
resetBlocked()
Thread safe resetting of the blocked counter.
|
public WebViewCounters(WebViewCounters.EventsListener eventsListener)
eventsListener - A reference to an implementation of EventsListener.public static AdblockWebView.EventsListener bindAdblockWebView(WebViewCounters.EventsListener eventsListener)
eventsListener - which should be bound to the newly created implementation of AdblockWebView.EventsListener.public void resetBlocked()
public void resetAllowlisted()
public void incrementBlocked()
public void incrementAllowlisted()