OLD | NEW |
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-2015 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 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags; | 136 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags; |
137 | 137 |
138 | 138 |
139 TFilterElementHideTagsNamed m_elementHideTagsId; | 139 TFilterElementHideTagsNamed m_elementHideTagsId; |
140 TFilterElementHideTagsNamed m_elementHideTagsClass; | 140 TFilterElementHideTagsNamed m_elementHideTagsClass; |
141 TFilterElementHideTags m_elementHideTags; | 141 TFilterElementHideTags m_elementHideTags; |
142 | 142 |
143 void ClearFilters(); | 143 void ClearFilters(); |
144 | 144 |
145 public: | 145 public: |
146 | |
147 CPluginFilter(const CString& dataPath = ""); | 146 CPluginFilter(const CString& dataPath = ""); |
148 | |
149 bool LoadHideFilters(std::vector<std::wstring> filters); | 147 bool LoadHideFilters(std::vector<std::wstring> filters); |
150 | |
151 bool AddFilterElementHide(CString filter); | 148 bool AddFilterElementHide(CString filter); |
152 | |
153 | |
154 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws
tring& domain, const std::wstring& indent) const; | 149 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws
tring& domain, const std::wstring& indent) const; |
155 | |
156 | |
157 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy
pe contentType, const std::wstring& domain, bool addDebug=false) const; | |
158 | |
159 HANDLE hideFiltersLoadedEvent; | 150 HANDLE hideFiltersLoadedEvent; |
160 }; | 151 }; |
161 | 152 |
162 | 153 |
163 #endif // _PLUGIN_FILTER_H_ | 154 #endif // _PLUGIN_FILTER_H_ |
OLD | NEW |