Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/libadblockplus/FilterEngine.java

Issue 29331923: Issue 3364 - Implement JNI bindings for IsDocument/ElemhideWhitelisted (Closed)
Patch Set: Created Dec. 4, 2015, 3:14 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/org/adblockplus/brazil/RequestHandler.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/libadblockplus/FilterEngine.java
diff --git a/src/org/adblockplus/libadblockplus/FilterEngine.java b/src/org/adblockplus/libadblockplus/FilterEngine.java
index 2849141e449217f83d8b560495c6e4ddd80eff52..2e7c7d5372905e705ea4e3c24bb595635e288fe8 100644
--- a/src/org/adblockplus/libadblockplus/FilterEngine.java
+++ b/src/org/adblockplus/libadblockplus/FilterEngine.java
@@ -102,9 +102,9 @@ public final class FilterEngine implements Disposable
forceUpdateCheck(this.ptr, callback != null ? callback.ptr : 0);
}
- public List<String> getElementHidingSelectors(final String domain)
+ public List<String> getElementHidingSelectors(final String url)
{
- return getElementHidingSelectors(this.ptr, domain);
+ return getElementHidingSelectors(this.ptr, url);
}
public void showNextNotification(final String url)
@@ -137,6 +137,16 @@ public final class FilterEngine implements Disposable
return matches(this.ptr, url, contentType, documentUrls);
}
+ public boolean isDocumentWhitelisted(String url, String[] documentUrls)
+ {
+ return isDocumentWhitelisted(this.ptr, url, documentUrls);
+ }
+
+ public boolean isElemhideWhitelisted(String url, String[] documentUrls)
+ {
+ return isElemhideWhitelisted(this.ptr, url, documentUrls);
+ }
+
public JsValue getPref(final String pref)
{
return getPref(this.ptr, pref);
@@ -195,7 +205,7 @@ public final class FilterEngine implements Disposable
private final static native void forceUpdateCheck(long ptr, long updatePtr);
- private final static native List<String> getElementHidingSelectors(long ptr, String domain);
+ private final static native List<String> getElementHidingSelectors(long ptr, String url);
private final static native void showNextNotification(long ptr, String url);
@@ -209,6 +219,10 @@ public final class FilterEngine implements Disposable
private final static native Filter matches(long ptr, String url, ContentType contentType, String[] documentUrls);
+ private final static native boolean isDocumentWhitelisted(long ptr, String url, String[] documentUrls);
+
+ private final static native boolean isElemhideWhitelisted(long ptr, String url, String[] documentUrls);
+
private final static native void setPref(long ptr, String pref, long valuePtr);
private final static native void dtor(long ptr);
« no previous file with comments | « src/org/adblockplus/brazil/RequestHandler.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld