@AnyThread public class ContentBlockingController extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ContentBlockingController.ContentBlockingException |
static class |
ContentBlockingController.Event |
static class |
ContentBlockingController.LogEntry
An entry in the content blocking log for a site.
|
Constructor and Description |
---|
ContentBlockingController() |
Modifier and Type | Method and Description |
---|---|
void |
addException(GeckoSession session)
Add a content blocking exception for the site currently loaded by the supplied
GeckoSession . |
GeckoResult<Boolean> |
checkException(GeckoSession session)
Check whether or not there is an exception for the site currently loaded by the
supplied
GeckoSession . |
void |
clearExceptionList()
Clear the content blocking exception list entirely.
|
GeckoResult<List<ContentBlockingController.LogEntry>> |
getLog(GeckoSession session)
Get a log of all content blocking information for the site currently loaded by the
supplied
GeckoSession . |
void |
removeException(ContentBlockingController.ContentBlockingException exception)
Remove the exception specified by the supplied
ContentBlockingController.ContentBlockingException from
the content blocking exception list, if it is present. |
void |
removeException(GeckoSession session)
Remove an exception for the site currently loaded by the supplied
GeckoSession
from the content blocking exception list, if there is such an exception. |
void |
restoreExceptionList(List<ContentBlockingController.ContentBlockingException> list)
Restore the supplied List of
ContentBlockingController.ContentBlockingException , overwriting the existing exception list. |
GeckoResult<List<ContentBlockingController.ContentBlockingException>> |
saveExceptionList()
Save the current content blocking exception list as a List of
ContentBlockingController.ContentBlockingException . |
@UiThread public void addException(@NonNull GeckoSession session)
GeckoSession
.session
- A GeckoSession
whose site will be added to the content
blocking exceptions list.@UiThread public void removeException(@NonNull GeckoSession session)
GeckoSession
from the content blocking exception list, if there is such an exception. If there is no
such exception, this is a no-op.session
- A GeckoSession
whose site will be removed from the content
blocking exceptions list.@AnyThread public void removeException(@NonNull ContentBlockingController.ContentBlockingException exception)
ContentBlockingController.ContentBlockingException
from
the content blocking exception list, if it is present. If there is no such exception,
this is a no-op.exception
- A ContentBlockingController.ContentBlockingException
which will be removed from the
content blocking exception list.@UiThread @NonNull public GeckoResult<Boolean> checkException(@NonNull GeckoSession session)
GeckoSession
.session
- A GeckoSession
whose site will be checked against the content
blocking exceptions list.GeckoResult
which resolves to a Boolean indicating whether or
not the current site is on the exception list.@UiThread @NonNull public GeckoResult<List<ContentBlockingController.ContentBlockingException>> saveExceptionList()
ContentBlockingController.ContentBlockingException
.ContentBlockingController.ContentBlockingException
which can be used to restore or
inspect the current exception list.@AnyThread public void restoreExceptionList(@NonNull List<ContentBlockingController.ContentBlockingException> list)
ContentBlockingController.ContentBlockingException
, overwriting the existing exception list.list
- A List of ContentBlockingController.ContentBlockingException
originally created by saveExceptionList()
.@UiThread public void clearExceptionList()
@UiThread @NonNull public GeckoResult<List<ContentBlockingController.LogEntry>> getLog(@NonNull GeckoSession session)
GeckoSession
.session
- A GeckoSession
for which you want the content blocking log.GeckoResult
that resolves to the list of content blocking log entries.