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

Side by Side Diff: src/plugin/PluginFilter.h

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: rebase Created Feb. 25, 2016, 5:38 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 | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2016 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
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // (Tag,Name) -> Filter 132 // (Tag,Name) -> Filter
133 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed; 133 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed;
134 134
135 // Tag -> Filter 135 // Tag -> Filter
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 std::vector<std::wstring> m_hideFilters;
142 143
143 void ClearFilters(); 144 void ClearFilters();
144 145
145 public: 146 public:
146 CPluginFilter(const CString& dataPath = ""); 147 CPluginFilter(const CString& dataPath = "");
147 bool LoadHideFilters(std::vector<std::wstring> filters); 148 bool LoadHideFilters(const std::vector<std::wstring>& filters);
148 bool AddFilterElementHide(CString filter); 149 bool AddFilterElementHide(CString filter);
149 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent) const; 150 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent) const;
150 HANDLE hideFiltersLoadedEvent; 151 HANDLE hideFiltersLoadedEvent;
152 const std::vector<std::wstring>& GetHideFilters() const;
151 }; 153 };
152 154
153 155
154 #endif // _PLUGIN_FILTER_H_ 156 #endif // _PLUGIN_FILTER_H_
OLDNEW
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld