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

Side by Side Diff: compiled/RegExpFilter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Reworked JS binding generation Created Feb. 1, 2016, 9:14 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
OLDNEW
(Empty)
1 #ifndef ADBLOCK_PLUS_REG_EXP_FILTER_H
2 #define ADBLOCK_PLUS_REG_EXP_FILTER_H
3
4 #include "Filter.h"
5 #include "ActiveFilter.h"
6
7 class RegExpFilter : public ActiveFilter
8 {
9 private:
10 enum TrippleState {YES, NO, ANY};
11
12 mutable int mRegexpId;
13 String mRegexpSource;
14 int mContentType;
15 bool mMatchCase;
16 TrippleState mThirdParty;
17 TrippleState mCollapse;
18 void ProcessOption(String& options, int optionStart,
19 int optionEnd, int valueStart, int valueEnd);
20 public:
21 explicit RegExpFilter(const String& text,
22 String::size_type patternStart, String::size_type patternEnd);
23 ~RegExpFilter();
24 static Filter* Create(const String& text);
25 EMSCRIPTEN_KEEPALIVE static void InitJSTypes();
26 static String RegExpFromSource(const String& source);
27 Type GetType() const;
28 EMSCRIPTEN_KEEPALIVE bool Matches(const String& location, int typeMask, String & docDomain,
29 bool thirdParty, const String& sitekey) const;
30 };
31
32 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld