LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 typedef std::multimap<std::wstring, CFilterElementHide> TFilterElementHideTags
; | 131 typedef std::multimap<std::wstring, CFilterElementHide> TFilterElementHideTags
; |
132 | 132 |
133 | 133 |
134 TFilterElementHideTagsNamed m_elementHideTagsId; | 134 TFilterElementHideTagsNamed m_elementHideTagsId; |
135 TFilterElementHideTagsNamed m_elementHideTagsClass; | 135 TFilterElementHideTagsNamed m_elementHideTagsClass; |
136 TFilterElementHideTags m_elementHideTags; | 136 TFilterElementHideTags m_elementHideTags; |
137 | 137 |
138 void ClearFilters(); | 138 void ClearFilters(); |
139 | 139 |
140 public: | 140 public: |
141 | |
142 CPluginFilter(const std::wstring& dataPath = L""); | 141 CPluginFilter(const std::wstring& dataPath = L""); |
143 | |
144 bool LoadHideFilters(std::vector<std::wstring> filters); | 142 bool LoadHideFilters(std::vector<std::wstring> filters); |
145 | |
146 bool AddFilterElementHide(std::wstring filter); | 143 bool AddFilterElementHide(std::wstring filter); |
147 | |
148 | |
149 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws
tring& domain, const std::wstring& indent) const; | 144 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws
tring& domain, const std::wstring& indent) const; |
150 | |
151 | |
152 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy
pe contentType, const std::wstring& domain, bool addDebug=false) const; | |
153 | |
154 HANDLE hideFiltersLoadedEvent; | 145 HANDLE hideFiltersLoadedEvent; |
155 }; | 146 }; |
156 | 147 |
157 | 148 |
158 #endif // _PLUGIN_FILTER_H_ | 149 #endif // _PLUGIN_FILTER_H_ |
LEFT | RIGHT |