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

Unified Diff: compiled/bindings/main.cpp

Issue 29587914: Issue 5142 - Convert Element Hiding to C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: mFiltersByDomain is now an OwnedStringMap Created Jan. 26, 2018, 8:41 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 | « compiled/ElemHide.cpp ('k') | compiled/filter/ActiveFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings/main.cpp
===================================================================
--- a/compiled/bindings/main.cpp
+++ b/compiled/bindings/main.cpp
@@ -29,16 +29,17 @@
#include "../filter/ElemHideBase.h"
#include "../filter/ElemHideFilter.h"
#include "../filter/ElemHideException.h"
#include "../filter/ElemHideEmulationFilter.h"
#include "../subscription/Subscription.h"
#include "../subscription/DownloadableSubscription.h"
#include "../subscription/UserDefinedSubscription.h"
#include "../storage/FilterStorage.h"
+#include "../ElemHide.h"
#include "../FilterNotifier.h"
int main()
{
try
{
class_<Filter>("Filter")
.property("text", &Filter::GetText)
@@ -137,16 +138,30 @@
.property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
.function("subscriptionAt", &FilterStorage::SubscriptionAt)
.function("indexOfSubscription", &FilterStorage::IndexOfSubscription)
.function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionForFilter)
.function("addSubscription", &FilterStorage::AddSubscription)
.function("removeSubscription", &FilterStorage::RemoveSubscription)
.function("moveSubscription", &FilterStorage::MoveSubscription);
+ class_<ElemHide_SelectorList>("ElemHide_SelectorList")
+ .property("selectorCount", &ElemHide_SelectorList::GetSelectorCount)
+ .function("selectorAt", &ElemHide_SelectorList::SelectorAt)
+ .function("filterKeyAt", &ElemHide_SelectorList::FilterKeyAt);
+
+ class_<ElemHide>("ElemHide")
+ .class_function("create", &ElemHide::Create)
+ .function("add", &ElemHide::Add)
+ .function("remove", &ElemHide::Remove)
+ .function("clear", &ElemHide::Clear)
+ .function("getException", &ElemHide::GetException)
+ .function("getSelectorsForDomain", &ElemHide::GetSelectorsForDomain)
+ .function("getUnconditionalSelectors", &ElemHide::GetUnconditionalSelectors);
+
printBindings();
RegExpFilter::GenerateCustomBindings();
FilterNotifier::GenerateCustomBindings();
return 0;
}
catch (const std::exception& e)
{
« no previous file with comments | « compiled/ElemHide.cpp ('k') | compiled/filter/ActiveFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld