OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 /* | 18 /* |
19 * http://msdn.microsoft.com/en-us/library/bb250436.aspx | 19 * http://msdn.microsoft.com/en-us/library/bb250436.aspx |
20 */ | 20 */ |
21 | 21 |
22 #ifndef _PLUGIN_CLASS_H_ | 22 #ifndef _PLUGIN_CLASS_H_ |
23 #define _PLUGIN_CLASS_H_ | 23 #define _PLUGIN_CLASS_H_ |
24 | 24 |
25 | 25 |
26 #include "Plugin.h" | 26 #include "Plugin.h" |
| 27 #include "PluginDebug.h" |
27 #include "PluginTabBase.h" | 28 #include "PluginTabBase.h" |
28 #define _CRTDBG_MAP_ALLOC | 29 #define _CRTDBG_MAP_ALLOC |
29 #include <stdlib.h> | 30 #include <stdlib.h> |
30 #include <crtdbg.h> | 31 #include <crtdbg.h> |
31 #include <set> | 32 #include <set> |
32 | 33 |
33 #include "NotificationMessage.h" | 34 #include "NotificationMessage.h" |
34 | 35 |
35 #define ICON_PLUGIN_DISABLED 0 | 36 #define ICON_PLUGIN_DISABLED 0 |
36 #define ICON_PLUGIN_ENABLED 1 | 37 #define ICON_PLUGIN_ENABLED 1 |
37 #define ICON_PLUGIN_DEACTIVATED 2 | 38 #define ICON_PLUGIN_DEACTIVATED 2 |
38 #define ICON_MAX 3 | 39 #define ICON_MAX 3 |
39 | 40 |
40 #define WM_LAUNCH_INFO (WM_APP + 10) | 41 #define WM_LAUNCH_INFO (WM_APP + 10) |
41 | 42 |
42 class CPluginMimeFilterClient; | 43 class CPluginMimeFilterClient; |
43 | 44 |
44 | 45 |
45 class ATL_NO_VTABLE CPluginClass : | 46 class ATL_NO_VTABLE CPluginClass : |
46 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, | 47 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, |
47 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>, | 48 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>, |
48 public ATL::IObjectWithSiteImpl<CPluginClass>, | 49 public ATL::IObjectWithSiteImpl<CPluginClass>, |
49 public IOleCommandTarget, | 50 public IOleCommandTarget, |
50 public ATL::IDispEventImpl<1, CPluginClass, &DIID_DWebBrowserEvents2, &LIBID_S
HDocVw, 1, 1> | 51 public ATL::IDispEventImpl<1, CPluginClass, &DIID_DWebBrowserEvents2, &LIBID_S
HDocVw, 1, 1> |
51 { | 52 { |
52 | 53 |
53 friend class CPluginTab; | 54 friend class CPluginTab; |
54 | 55 |
55 private: | 56 private: |
| 57 /** |
| 58 * Existence of this object ensures the existence of the log. |
| 59 * Defined first so that the log is available to the constructors of other mem
bers. |
| 60 */ |
| 61 LogQueueReference lqr; |
56 | 62 |
57 CPluginTab* m_tab; | 63 CPluginTab* m_tab; |
58 | 64 |
59 public: | 65 public: |
60 | 66 |
61 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) | 67 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) |
62 | 68 |
63 DECLARE_PROTECT_FINAL_CONSTRUCT() | 69 DECLARE_PROTECT_FINAL_CONSTRUCT() |
64 | 70 |
65 BEGIN_COM_MAP(CPluginClass) | 71 BEGIN_COM_MAP(CPluginClass) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 198 |
193 // Async browser | 199 // Async browser |
194 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 200 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
195 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 201 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
196 }; | 202 }; |
197 | 203 |
198 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 204 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
199 | 205 |
200 | 206 |
201 #endif // _PLUGIN_CLASS_H_ | 207 #endif // _PLUGIN_CLASS_H_ |
OLD | NEW |