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 #ifdef SUPPORT_CONFIG | 5 #ifdef SUPPORT_CONFIG |
6 #include "PluginConfig.h" | 6 #include "PluginConfig.h" |
7 #endif | 7 #endif |
8 #include "PluginTab.h" | 8 #include "PluginTab.h" |
9 #include "PluginDomTraverser.h" | 9 #include "PluginDomTraverser.h" |
10 #include "PluginClass.h" | 10 #include "PluginClass.h" |
11 | 11 |
12 #include "PluginTabBase.h" | 12 #include "PluginTabBase.h" |
13 #include "PluginUtil.h" | 13 #include "PluginUtil.h" |
| 14 #include "../shared/Utils.h" |
14 #include <dispex.h> | 15 #include <dispex.h> |
15 | 16 |
16 int CPluginTabBase::s_dictionaryVersion = 0; | 17 int CPluginTabBase::s_dictionaryVersion = 0; |
17 int CPluginTabBase::s_settingsVersion = 1; | 18 int CPluginTabBase::s_settingsVersion = 1; |
18 #ifdef SUPPORT_FILTER | 19 #ifdef SUPPORT_FILTER |
19 int CPluginTabBase::s_filterVersion = 0; | 20 int CPluginTabBase::s_filterVersion = 0; |
20 #endif | 21 #endif |
21 #ifdef SUPPORT_WHITELIST | 22 #ifdef SUPPORT_WHITELIST |
22 int CPluginTabBase::s_whitelistVersion = 0; | 23 int CPluginTabBase::s_whitelistVersion = 0; |
23 #endif | 24 #endif |
24 #ifdef SUPPORT_CONFIG | 25 #ifdef SUPPORT_CONFIG |
25 int CPluginTabBase::s_configVersion = 0; | 26 int CPluginTabBase::s_configVersion = 0; |
26 #endif | 27 #endif |
27 | 28 |
28 | 29 |
29 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) | 30 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) |
30 : m_plugin(plugin) | 31 : m_plugin(plugin) |
31 , m_isActivated(false) | 32 , m_isActivated(false) |
32 , m_continueThreadRunning(true) | 33 , m_continueThreadRunning(true) |
33 { | 34 { |
34 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); | 35 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); |
35 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); | 36 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); |
36 | 37 |
37 CPluginClient* client = CPluginClient::GetInstance(); | 38 CPluginClient* client = CPluginClient::GetInstance(); |
38 if (client->GetIEVersion() < 10) | 39 if ( ABP::IE::installed_major_version() < 10 ) |
39 { | 40 { |
40 m_isActivated = true; | 41 m_isActivated = true; |
41 } | 42 } |
42 | 43 |
43 try | 44 try |
44 { | 45 { |
45 m_thread = std::thread(&CPluginTabBase::ThreadProc, this); | 46 m_thread = std::thread(&CPluginTabBase::ThreadProc, this); |
46 } | 47 } |
47 catch (const std::system_error& ex) | 48 catch (const std::system_error& ex) |
48 { | 49 { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); | 391 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); |
391 } | 392 } |
392 | 393 |
393 // Non-hanging sleep | 394 // Non-hanging sleep |
394 Sleep(50); | 395 Sleep(50); |
395 } | 396 } |
396 | 397 |
397 tabLoopIteration++; | 398 tabLoopIteration++; |
398 } | 399 } |
399 } | 400 } |
OLD | NEW |