public class CombinedSiteKeyExtractor extends java.lang.Object implements SiteKeyExtractor
AdblockWebView has.
In particular, it reads the WebResourceRequest.isForMainFrame() property
in order to understand, if we need to fire fallback extractor| Modifier | Constructor and Description |
|---|---|
protected |
CombinedSiteKeyExtractor(AdblockWebView webView) |
| Modifier and Type | Method and Description |
|---|---|
android.webkit.WebResourceResponse |
extract(android.webkit.WebResourceRequest frameRequest)
This method is called by the
AdblockWebView during
WebViewClient.shouldInterceptRequest(WebView, WebResourceRequest)
This method must perform custom HTTP request or return one of states from
AdblockWebView.WebResponseResult |
void |
setEnabled(boolean enabled) |
void |
setSiteKeysConfiguration(org.adblockplus.libadblockplus.sitekey.SiteKeysConfiguration siteKeysConfiguration)
This method is called by the
AdblockWebView during
AdblockWebView.setSiteKeysConfiguration(SiteKeysConfiguration)
You can later use siteKeysConfiguration in order to verify the sitekey |
void |
startNewPage()
Notifies about starting of a new page
|
boolean |
waitForSitekeyCheck(java.lang.String url,
boolean isMainFrame)
Blocks the calling thread while checking the sitekey
|
protected CombinedSiteKeyExtractor(AdblockWebView webView)
public android.webkit.WebResourceResponse extract(android.webkit.WebResourceRequest frameRequest)
SiteKeyExtractorAdblockWebView during
WebViewClient.shouldInterceptRequest(WebView, WebResourceRequest)
This method must perform custom HTTP request or return one of states from
AdblockWebView.WebResponseResultextract in interface SiteKeyExtractorframeRequest - a request that might be used for understanding
additional options (e.g. is the request intended for the main frame)public void setSiteKeysConfiguration(org.adblockplus.libadblockplus.sitekey.SiteKeysConfiguration siteKeysConfiguration)
SiteKeyExtractorAdblockWebView during
AdblockWebView.setSiteKeysConfiguration(SiteKeysConfiguration)
You can later use siteKeysConfiguration in order to verify the sitekeysetSiteKeysConfiguration in interface SiteKeyExtractorsiteKeysConfiguration - the configuration to setpublic void startNewPage()
SiteKeyExtractorstartNewPage in interface SiteKeyExtractorpublic boolean waitForSitekeyCheck(java.lang.String url,
boolean isMainFrame)
SiteKeyExtractorWill be removed later in a favor of setting internal WebViewClient for every SiteKeyExtractor
waitForSitekeyCheck in interface SiteKeyExtractorurl - a request url which is held back by this callisMainFrame - a boolean indicating whether this is a main or a subframe requestpublic void setEnabled(boolean enabled)
setEnabled in interface SiteKeyExtractor