Index: src/plugin/PluginClass.h |
=================================================================== |
--- a/src/plugin/PluginClass.h |
+++ b/src/plugin/PluginClass.h |
@@ -29,8 +29,8 @@ |
#include <stdlib.h> |
#include <crtdbg.h> |
#include <set> |
- |
#include "NotificationMessage.h" |
+#include "DetachedInitialization.h" |
#define ICON_PLUGIN_DISABLED 0 |
#define ICON_PLUGIN_ENABLED 1 |
@@ -112,7 +112,6 @@ |
static DWORD WINAPI StartInitObject(LPVOID thisPtr); |
bool InitObject(); |
- void CloseTheme(); |
void UpdateTheme(); |
static HICON GetStatusBarIcon(const std::wstring& url); |
@@ -137,6 +136,11 @@ |
void ShowStatusBar(); |
bool IsStatusBarEnabled(); |
+ |
+ static void Initializer(); |
+ typedef DetachedInitializer<Initializer> DetachedInitializerType; |
+ static DetachedInitializerType di; |
+ inline static void EnsureInitialized() { di.EnsureInitialized(); } |
/** |
* A browser interface pointer to our site object |
@@ -175,7 +179,6 @@ |
static HANDLE s_hMainThread; |
static bool s_isMainThreadDone; |
- static HINSTANCE s_hUxtheme; |
static std::set<CPluginClass*> s_instances; |
static std::map<DWORD,CPluginClass*> s_threadInstances; |
static CComAutoCriticalSection s_criticalSectionLocal; |