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

Unified Diff: src/plugin/PluginDomTraverserBase.h

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: rename OnQuit Created Sept. 30, 2016, 3:25 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginDomTraverserBase.h
diff --git a/src/plugin/PluginDomTraverserBase.h b/src/plugin/PluginDomTraverserBase.h
index 96c617d04f8db0ca8987122757d6bcc7a33c6e17..64d033db432b65b480462357c66ffde46fdf1367 100644
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -37,7 +37,7 @@ class CPluginDomTraverserBase
public:
- CPluginDomTraverserBase(CPluginTab* tab);
+ explicit CPluginDomTraverserBase(const PluginFilterPtr& pluginFilter);
~CPluginDomTraverserBase();
void TraverseHeader(bool isHeaderTraversed);
@@ -66,9 +66,6 @@ protected:
bool m_isHeaderTraversed;
- // Caching
- long m_cacheDomElementCount;
-
int m_cacheIndexLast;
int m_cacheElementsMax;
std::set<std::wstring> m_cacheDocumentHasFrames;
@@ -76,13 +73,12 @@ protected:
T* m_cacheElements;
- CPluginTab* m_tab;
- CComPtr<IWebBrowser2> m_pBrowser;
+ std::shared_ptr<const CPluginFilter> m_pluginFilter;
};
template <class T>
-CPluginDomTraverserBase<T>::CPluginDomTraverserBase(CPluginTab* tab) :
- m_tab(tab), m_isHeaderTraversed(false), m_cacheDomElementCount(0), m_cacheIndexLast(0), m_cacheElementsMax(5000)
+CPluginDomTraverserBase<T>::CPluginDomTraverserBase(const PluginFilterPtr& pluginFilter)
+ : m_pluginFilter(pluginFilter), m_isHeaderTraversed(false), m_cacheIndexLast(0), m_cacheElementsMax(5000)
{
m_cacheElements = new T[m_cacheElementsMax];
}
@@ -128,7 +124,6 @@ bool CPluginDomTraverserBase<T>::IsEnabled()
template <class T>
void CPluginDomTraverserBase<T>::TraverseDocument(IWebBrowser2* pBrowser, bool isMainDoc, const std::wstring& indent)
{
- DWORD res = WaitForSingleObject(m_tab->m_filter.hideFiltersLoadedEvent, ENGINE_STARTUP_TIMEOUT);
if (!IsEnabled()) return;
VARIANT_BOOL isBusy;
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld