Index: src/plugin/PluginTabBase.cpp |
=================================================================== |
--- a/src/plugin/PluginTabBase.cpp |
+++ b/src/plugin/PluginTabBase.cpp |
@@ -29,6 +29,7 @@ |
CPluginTabBase::CPluginTabBase(CPluginClass* plugin) : m_plugin(plugin), m_isActivated(false) |
{ |
m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); |
+ m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, TRUE, FALSE, NULL); |
Felix Dahlke
2013/08/07 09:34:49
Since this is C++, we should use true and false in
|
CPluginClient* client = CPluginClient::GetInstance(); |
if (client->GetIEVersion() < 10) |
@@ -82,6 +83,13 @@ |
m_isActivated = true; |
} |
+DWORD WINAPI FilterLoader(void* thisPtrVoid) |
+{ |
+ CPluginTabBase* thisPtr = (CPluginTabBase*)thisPtrVoid; |
+ thisPtr->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSelectors(thisPtr->GetDocumentDomain().GetString())); |
+ SetEvent(thisPtr->m_filter->hideFiltersLoadedEvent); |
+ return 0; |
+} |
void CPluginTabBase::OnNavigate(const CString& url) |
{ |
@@ -93,7 +101,8 @@ |
#endif |
std::wstring domainString = GetDocumentDomain(); |
- m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSelectors(domainString)); |
+ ResetEvent(m_filter->hideFiltersLoadedEvent); |
+ CreateThread(NULL, NULL, &FilterLoader, this, NULL, NULL); |
Felix Dahlke
2013/08/07 13:23:03
How I see it, this is the relevant change, right?
Oleksandr
2013/08/07 16:07:40
This is not the only relevant change. This is just
|
#ifdef SUPPORT_DOM_TRAVERSER |
m_traverser->ClearCache(); |