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

Unified Diff: compiled/bindings/main.cpp

Issue 29594607: Issue 5143 - Convert ElemHideEmulation to C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Improvements from review. Created Nov. 20, 2017, 7:15 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/ElemHideEmulation.cpp ('k') | lib/elemHideEmulation.js » ('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
@@ -30,16 +30,17 @@
#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 "../ElemHideEmulation.h"
#include "../FilterNotifier.h"
int main()
{
try
{
class_<Filter>("Filter")
.property("text", &Filter::GetText)
@@ -145,20 +146,29 @@
.property("selectorCount", &_ElemHide_SelectorList::GetSelectorCount)
.function("selectorAt", &_ElemHide_SelectorList::SelectorAt)
.function("filterKeyAt", &_ElemHide_SelectorList::FilterKeyAt);
singleton<ElemHide>("ElemHide", &ElemHide::GetInstance)
.function("add", &ElemHide::Add)
.function("remove", &ElemHide::Remove)
.function("clear", &ElemHide::Clear)
- .function("getException", &ElemHide::GetException)
.function("getSelectorsForDomain", &ElemHide::GetSelectorsForDomain)
.function("getUnconditionalSelectors", &ElemHide::GetUnconditionalSelectors);
+ class_<ElemHideEmulation_FilterList>("ElemHideEmulation_FilterList")
+ .property("filterCount", &ElemHideEmulation_FilterList::GetFilterCount)
+ .function("filterAt", &ElemHideEmulation_FilterList::FilterAt);
+
+ singleton<ElemHideEmulation>("ElemHideEmulation", &ElemHideEmulation::GetInstance)
+ .function("add", &ElemHideEmulation::Add)
+ .function("remove", &ElemHideEmulation::Remove)
+ .function("clear", &ElemHideEmulation::Clear)
+ .function("getRulesForDomain", &ElemHideEmulation::GetRulesForDomain);
+
printBindings();
RegExpFilter::GenerateCustomBindings();
FilterNotifier::GenerateCustomBindings();
return 0;
}
catch (const std::exception& e)
{
« no previous file with comments | « compiled/ElemHideEmulation.cpp ('k') | lib/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld