OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginClient.h" | 3 #include "PluginClient.h" |
4 #include "PluginSettings.h" | 4 #include "PluginSettings.h" |
5 #include "PluginTab.h" | 5 #include "PluginTab.h" |
6 #include "AdblockPlusDomTraverser.h" | 6 #include "AdblockPlusDomTraverser.h" |
7 #include "PluginClass.h" | 7 #include "PluginClass.h" |
8 #include "PluginTabBase.h" | 8 #include "PluginTabBase.h" |
9 #include "PluginUtil.h" | 9 #include "PluginUtil.h" |
| 10 #include "../shared/IE_version.h" |
10 #include <dispex.h> | 11 #include <dispex.h> |
11 #include <Mshtmhst.h> | 12 #include <Mshtmhst.h> |
12 | 13 |
13 int CPluginTabBase::s_dictionaryVersion = 0; | 14 int CPluginTabBase::s_dictionaryVersion = 0; |
14 int CPluginTabBase::s_settingsVersion = 1; | 15 int CPluginTabBase::s_settingsVersion = 1; |
15 int CPluginTabBase::s_filterVersion = 0; | 16 int CPluginTabBase::s_filterVersion = 0; |
16 int CPluginTabBase::s_whitelistVersion = 0; | 17 int CPluginTabBase::s_whitelistVersion = 0; |
17 | 18 |
18 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) | 19 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) |
19 : m_plugin(plugin) | 20 : m_plugin(plugin) |
20 , m_isActivated(false) | 21 , m_isActivated(false) |
21 , m_continueThreadRunning(true) | 22 , m_continueThreadRunning(true) |
22 { | 23 { |
23 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); | 24 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); |
24 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); | 25 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); |
25 | 26 |
26 CPluginClient* client = CPluginClient::GetInstance(); | 27 CPluginClient* client = CPluginClient::GetInstance(); |
27 if (client->GetIEVersion() < 10) | 28 if (AdblockPlus::IE::InstalledMajorVersion() < 10) |
28 { | 29 { |
29 m_isActivated = true; | 30 m_isActivated = true; |
30 } | 31 } |
31 | 32 |
32 try | 33 try |
33 { | 34 { |
34 m_thread = std::thread(&CPluginTabBase::ThreadProc, this); | 35 m_thread = std::thread(&CPluginTabBase::ThreadProc, this); |
35 } | 36 } |
36 catch (const std::system_error& ex) | 37 catch (const std::system_error& ex) |
37 { | 38 { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); | 348 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); |
348 } | 349 } |
349 | 350 |
350 // Non-hanging sleep | 351 // Non-hanging sleep |
351 Sleep(50); | 352 Sleep(50); |
352 } | 353 } |
353 | 354 |
354 tabLoopIteration++; | 355 tabLoopIteration++; |
355 } | 356 } |
356 } | 357 } |
OLD | NEW |