Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginClass.h

Issue 5948518908821504: Issue #1158 - removed unnecessary definitions and #ifdef/#else/#endif sections (Closed)
Patch Set: Created Aug. 6, 2014, 7:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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
26 #ifdef SUPPORT_WHITELIST
27 #define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1) 25 #define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1)
Oleksandr 2014/10/02 21:24:02 WM_WHITELIST_DOMAIN isn't used anymore
28 #else
29 #define WM_GROUP2_START (WM_LAUNCH_INFO + 1)
30 #endif
31 26
32 class CPluginMimeFilterClient; 27 class CPluginMimeFilterClient;
33 28
34 29
35 class ATL_NO_VTABLE CPluginClass : 30 class ATL_NO_VTABLE CPluginClass :
36 public CComObjectRootEx<CComMultiThreadModel>, 31 public CComObjectRootEx<CComMultiThreadModel>,
37 public CComCoClass<CPluginClass, &CLSID_PluginClass>, 32 public CComCoClass<CPluginClass, &CLSID_PluginClass>,
38 public IObjectWithSiteImpl<CPluginClass>, 33 public IObjectWithSiteImpl<CPluginClass>,
39 public IDispatchImpl<IIEPlugin, &IID_IIEPlugin, &LIBID_PluginLib>, 34 public IDispatchImpl<IIEPlugin, &IID_IIEPlugin, &LIBID_PluginLib>,
40 public IOleCommandTarget 35 public IOleCommandTarget
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 153
159 static HICON GetIcon(int type); 154 static HICON GetIcon(int type);
160 155
161 // Main thread 156 // Main thread
162 static HANDLE s_hMainThread; 157 static HANDLE s_hMainThread;
163 static bool s_isMainThreadDone; 158 static bool s_isMainThreadDone;
164 159
165 static HANDLE GetMainThreadHandle(); 160 static HANDLE GetMainThreadHandle();
166 static bool IsMainThreadDone(HANDLE mainThread); 161 static bool IsMainThreadDone(HANDLE mainThread);
167 162
168
169 static HINSTANCE s_hUxtheme; 163 static HINSTANCE s_hUxtheme;
170 static std::set<CPluginClass*> s_instances; 164 static std::set<CPluginClass*> s_instances;
171 static std::map<DWORD,CPluginClass*> s_threadInstances; 165 static std::map<DWORD,CPluginClass*> s_threadInstances;
172
173 #ifdef SUPPORT_WHITELIST
174 static std::map<UINT, CString> s_menuDomains; 166 static std::map<UINT, CString> s_menuDomains;
Oleksandr 2014/10/02 21:24:02 Looks like we can remove s_menuDomains as well.
175 #endif
176
177 static CComAutoCriticalSection s_criticalSectionLocal; 167 static CComAutoCriticalSection s_criticalSectionLocal;
178 static CComAutoCriticalSection s_criticalSectionBrowser; 168 static CComAutoCriticalSection s_criticalSectionBrowser;
179 static CComAutoCriticalSection s_criticalSectionWindow; 169 static CComAutoCriticalSection s_criticalSectionWindow;
180 #ifdef SUPPORT_WHITELIST
181 static CComAutoCriticalSection s_criticalSectionWhiteList; 170 static CComAutoCriticalSection s_criticalSectionWhiteList;
Oleksandr 2014/10/02 21:24:02 s_criticalSectionWhiteList is unused.
182 #endif
183 171
184 // Async browser 172 // Async browser
185 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; 173 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2;
186
187 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); 174 static CComQIPtr<IWebBrowser2> GetAsyncBrowser();
188
189 }; 175 };
190 176
191 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) 177 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass)
192 178
193 179
194 #endif // _PLUGIN_CLASS_H_ 180 #endif // _PLUGIN_CLASS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld