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

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

Issue 29334386: Issue #2230 - Refactor filter life cycle and use
Patch Set: rebase only Created May 17, 2016, 7:45 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/AdblockPlusClient.cpp ('k') | src/plugin/AdblockPlusDomTraverser.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
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 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #ifndef _ADBLOCK_PLUS_DOM_TRAVERSER_H_ 18 #ifndef _ADBLOCK_PLUS_DOM_TRAVERSER_H_
19 #define _ADBLOCK_PLUS_DOM_TRAVERSER_H_ 19 #define _ADBLOCK_PLUS_DOM_TRAVERSER_H_
20 20
21 21
22 #include "PluginDomTraverserBase.h" 22 #include "PluginDomTraverserBase.h"
23 23
24 24
25 class CPluginTab;
26
27
28 class CPluginDomTraverserCache : public CPluginDomTraverserCacheBase 25 class CPluginDomTraverserCache : public CPluginDomTraverserCacheBase
29 { 26 {
30 public: 27 public:
31 28
32 bool m_isHidden; 29 bool m_isHidden;
33 30
34 CPluginDomTraverserCache() : CPluginDomTraverserCacheBase(), m_isHidden(false) {} 31 CPluginDomTraverserCache() : CPluginDomTraverserCacheBase(), m_isHidden(false) {}
35 32
36 void Init() { CPluginDomTraverserCacheBase::Init(); m_isHidden = false; } 33 void Init() { CPluginDomTraverserCacheBase::Init(); m_isHidden = false; }
37 }; 34 };
38 35
39 36
40 class CPluginDomTraverser : public CPluginDomTraverserBase<CPluginDomTraverserCa che> 37 class CPluginDomTraverser : public CPluginDomTraverserBase<CPluginDomTraverserCa che>
41 { 38 {
42 39
43 public: 40 public:
44 41
45 CPluginDomTraverser(CPluginTab* tab); 42 CPluginDomTraverser(CPluginFilter* filterSet);
46 43
47 protected: 44 protected:
48 45
49 bool OnIFrame(IHTMLElement* pEl, const std::wstring& url, const std::wstring& indent); 46 bool OnIFrame(IHTMLElement* pEl, const std::wstring& url, const std::wstring& indent);
50 bool OnElement(IHTMLElement* pEl, const std::wstring& tag, CPluginDomTraverser Cache* cache, bool isDebug, const std::wstring& indent); 47 bool OnElement(IHTMLElement* pEl, const std::wstring& tag, CPluginDomTraverser Cache* cache, bool isDebug, const std::wstring& indent);
51 48
52 bool IsEnabled(); 49 bool IsEnabled();
53 50
54 void HideElement(IHTMLElement* pEl, const std::wstring& type, const std::wstri ng& url, bool isDebug, const std::wstring& indent); 51 void HideElement(IHTMLElement* pEl, const std::wstring& type, const std::wstri ng& url, bool isDebug, const std::wstring& indent);
55 52
56 }; 53 };
57 54
58 55
59 #endif // _ADBLOCK_PLUS_DOM_TRAVERSER_H_ 56 #endif // _ADBLOCK_PLUS_DOM_TRAVERSER_H_
OLDNEW
« no previous file with comments | « src/plugin/AdblockPlusClient.cpp ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld