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 | 15 |
16 | 16 |
17 #define ICON_PLUGIN_DISABLED 0 | 17 #define ICON_PLUGIN_DISABLED 0 |
18 #define ICON_PLUGIN_ENABLED 1 | 18 #define ICON_PLUGIN_ENABLED 1 |
19 #define ICON_PLUGIN_DEACTIVATED 2 | 19 #define ICON_PLUGIN_DEACTIVATED 2 |
20 #define ICON_MAX 3 | 20 #define ICON_MAX 3 |
21 | 21 |
22 #define WM_LAUNCH_INFO (WM_APP + 10) | 22 #define WM_LAUNCH_INFO (WM_APP + 10) |
23 | 23 |
24 #ifdef SUPPORT_WHITELIST | 24 #ifdef SUPPORT_WHITELIST |
25 #define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1) | 25 #define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1) |
26 #define WM_WHITELIST_DOMAIN_MAX (WM_WHITELIST_DOMAIN + DOMAIN_HISTORY_MA
X_COUNT + 1) | |
27 #define WM_WHITELIST_DOMAIN_SUPPORT (WM_WHITELIST_DOMAIN_MAX + 1) | |
28 #define WM_WHITELIST_DOMAIN_SUPPORT_MAX (WM_WHITELIST_DOMAIN_SUPPORT + DOMAIN_HI
STORY_MAX_COUNT + 1) | |
29 #define WM_WHITELIST_DOMAIN_ERROR (WM_WHITELIST_DOMAIN_SUPPORT
_MAX + 1) | |
30 #define WM_WHITELIST_DOMAIN_ERROR_MAX (WM_WHITELIST_DOMAIN_ERROR + DOMAIN_
HISTORY_MAX_COUNT + 1) | |
31 #define WM_GROUP2_START (WM_WHITELIST_DOMAIN_ERROR_MAX + 1) | |
32 #else | 26 #else |
33 #define WM_GROUP2_START (WM_LAUNCH_INFO + 1) | 27 #define WM_GROUP2_START (WM_LAUNCH_INFO + 1) |
34 #endif | 28 #endif |
35 | 29 |
36 class CPluginMimeFilterClient; | 30 class CPluginMimeFilterClient; |
37 | 31 |
38 | 32 |
39 class ATL_NO_VTABLE CPluginClass : | 33 class ATL_NO_VTABLE CPluginClass : |
40 public CComObjectRootEx<CComMultiThreadModel>, | 34 public CComObjectRootEx<CComMultiThreadModel>, |
41 public CComCoClass<CPluginClass, &CLSID_PluginClass>, | 35 public CComCoClass<CPluginClass, &CLSID_PluginClass>, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 109 |
116 CString GetBrowserUrl() const; | 110 CString GetBrowserUrl() const; |
117 | 111 |
118 | 112 |
119 static DWORD WINAPI StartInitObject(LPVOID thisPtr); | 113 static DWORD WINAPI StartInitObject(LPVOID thisPtr); |
120 bool InitObject(bool bBHO); | 114 bool InitObject(bool bBHO); |
121 void CloseTheme(); | 115 void CloseTheme(); |
122 void UpdateTheme(); | 116 void UpdateTheme(); |
123 | 117 |
124 static HICON GetStatusBarIcon(const CString& url); | 118 static HICON GetStatusBarIcon(const CString& url); |
125 static void LaunchUpdater(const CString& path); | |
126 static CPluginClass* FindInstance(HWND hStatusBarWnd); | 119 static CPluginClass* FindInstance(HWND hStatusBarWnd); |
127 static LRESULT CALLBACK NewStatusProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); | 120 static LRESULT CALLBACK NewStatusProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); |
128 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); | 121 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); |
129 | 122 |
130 void BeforeNavigate2(DISPPARAMS* pDispParams); | 123 void BeforeNavigate2(DISPPARAMS* pDispParams); |
131 | 124 |
132 void Unadvice(); | 125 void Unadvice(); |
133 | 126 |
134 void ShowStatusBar(); | 127 void ShowStatusBar(); |
135 bool IsStatusBarEnabled(); | 128 bool IsStatusBarEnabled(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 180 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
188 | 181 |
189 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 182 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
190 | 183 |
191 }; | 184 }; |
192 | 185 |
193 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 186 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
194 | 187 |
195 | 188 |
196 #endif // _PLUGIN_CLASS_H_ | 189 #endif // _PLUGIN_CLASS_H_ |
OLD | NEW |