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

Side by Side Diff: compiled/api.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: How with CSS property filters Created Jan. 20, 2016, 1:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/WhiteListFilter.cpp ('k') | compiled/api.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef ADBLOCK_PLUS_TOOLS_H
2 #define ADBLOCK_PLUS_TOOLS_H
3
4 #include <emscripten.h>
5
6 #define FILTER_PROPERTY(type, name, getter, setter) \
7 private:\
8 type name;\
9 public:\
10 type getter() const\
11 {\
12 return name;\
13 }\
14 void setter(type value)\
15 {\
16 if (name != value)\
17 {\
18 type oldvalue = name;\
19 name = value;\
20 std::u16string action(u"filter." #name);\
21 FilterPtr filter = shared_from_this();\
22 EM_ASM_ARGS({\
23 var pointerToFilter = require("filterClasses").pointerToFilter;\
24 var filter = pointerToFilter($1);\
25 FilterNotifier.triggerListeners(getStringData($0), filter, $2, $3);\
26 }, &action, &filter, value, oldvalue);\
27 }\
28 }
29
30 #endif
OLDNEW
« no previous file with comments | « compiled/WhiteListFilter.cpp ('k') | compiled/api.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld