| OLD | NEW |
| 1 /* | 1 /* |
| 2 * http://msdn.microsoft.com/en-us/library/bb250436.aspx | 2 * http://msdn.microsoft.com/en-us/library/bb250436.aspx |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 #ifndef _PLUGIN_CLASS_H_ | 5 #ifndef _PLUGIN_CLASS_H_ |
| 6 #define _PLUGIN_CLASS_H_ | 6 #define _PLUGIN_CLASS_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "PluginTypedef.h" | 9 #include "PluginTypedef.h" |
| 10 #include "Plugin.h" | 10 #include "Plugin.h" |
| 11 #include "PluginTab.h" | 11 #include "PluginTab.h" |
| 12 #define _CRTDBG_MAP_ALLOC | 12 #define _CRTDBG_MAP_ALLOC |
| 13 #include <stdlib.h> | 13 #include <stdlib.h> |
| 14 #include <crtdbg.h> | 14 #include <crtdbg.h> |
| 15 #include <set> | 15 #include <set> |
| 16 | 16 |
| 17 #include "NotificationMessage.h" | 17 #include "NotificationMessage.h" |
| 18 | 18 |
| 19 #define ICON_PLUGIN_DISABLED 0 | 19 #define ICON_PLUGIN_DISABLED 0 |
| 20 #define ICON_PLUGIN_ENABLED 1 | 20 #define ICON_PLUGIN_ENABLED 1 |
| 21 #define ICON_PLUGIN_DEACTIVATED 2 | 21 #define ICON_PLUGIN_DEACTIVATED 2 |
| 22 #define ICON_MAX 3 | 22 #define ICON_MAX 3 |
| 23 | 23 |
| 24 #define WM_LAUNCH_INFO (WM_APP + 10) | 24 #define WM_LAUNCH_INFO (WM_APP + 10) |
| 25 #define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1) | |
| 26 | 25 |
| 27 class CPluginMimeFilterClient; | 26 class CPluginMimeFilterClient; |
| 28 | 27 |
| 29 | 28 |
| 30 class ATL_NO_VTABLE CPluginClass : | 29 class ATL_NO_VTABLE CPluginClass : |
| 31 public CComObjectRootEx<CComMultiThreadModel>, | 30 public CComObjectRootEx<CComMultiThreadModel>, |
| 32 public CComCoClass<CPluginClass, &CLSID_PluginClass>, | 31 public CComCoClass<CPluginClass, &CLSID_PluginClass>, |
| 33 public IObjectWithSiteImpl<CPluginClass>, | 32 public IObjectWithSiteImpl<CPluginClass>, |
| 34 public IDispatchImpl<IIEPlugin, &IID_IIEPlugin, &LIBID_PluginLib>, | 33 public IDispatchImpl<IIEPlugin, &IID_IIEPlugin, &LIBID_PluginLib>, |
| 35 public IOleCommandTarget | 34 public IOleCommandTarget |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Main thread | 155 // Main thread |
| 157 static HANDLE s_hMainThread; | 156 static HANDLE s_hMainThread; |
| 158 static bool s_isMainThreadDone; | 157 static bool s_isMainThreadDone; |
| 159 | 158 |
| 160 static HANDLE GetMainThreadHandle(); | 159 static HANDLE GetMainThreadHandle(); |
| 161 static bool IsMainThreadDone(HANDLE mainThread); | 160 static bool IsMainThreadDone(HANDLE mainThread); |
| 162 | 161 |
| 163 static HINSTANCE s_hUxtheme; | 162 static HINSTANCE s_hUxtheme; |
| 164 static std::set<CPluginClass*> s_instances; | 163 static std::set<CPluginClass*> s_instances; |
| 165 static std::map<DWORD,CPluginClass*> s_threadInstances; | 164 static std::map<DWORD,CPluginClass*> s_threadInstances; |
| 166 static std::map<UINT, CString> s_menuDomains; | |
| 167 static CComAutoCriticalSection s_criticalSectionLocal; | 165 static CComAutoCriticalSection s_criticalSectionLocal; |
| 168 static CComAutoCriticalSection s_criticalSectionBrowser; | 166 static CComAutoCriticalSection s_criticalSectionBrowser; |
| 169 static CComAutoCriticalSection s_criticalSectionWindow; | 167 static CComAutoCriticalSection s_criticalSectionWindow; |
| 170 static CComAutoCriticalSection s_criticalSectionWhiteList; | |
| 171 | 168 |
| 172 // Async browser | 169 // Async browser |
| 173 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 170 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
| 174 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 171 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
| 175 }; | 172 }; |
| 176 | 173 |
| 177 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 174 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
| 178 | 175 |
| 179 | 176 |
| 180 #endif // _PLUGIN_CLASS_H_ | 177 #endif // _PLUGIN_CLASS_H_ |
| OLD | NEW |