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

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

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: rebase only Created July 27, 2016, 9:11 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
« no previous file with comments | « src/plugin/Placeholder.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 class ATL_NO_VTABLE CPluginClass : 45 class ATL_NO_VTABLE CPluginClass :
45 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, 46 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>,
46 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>, 47 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>,
47 public ATL::IObjectWithSiteImpl<CPluginClass>, 48 public ATL::IObjectWithSiteImpl<CPluginClass>,
48 public IOleCommandTarget, 49 public IOleCommandTarget,
49 public ATL::IDispEventImpl<1, CPluginClass, &DIID_DWebBrowserEvents2, &LIBID_S HDocVw, 1, 1> 50 public ATL::IDispEventImpl<1, CPluginClass, &DIID_DWebBrowserEvents2, &LIBID_S HDocVw, 1, 1>
50 { 51 {
51 52
52 friend class CPluginTab; 53 friend class CPluginTab;
53 54
54 private: 55 private:
56 /**
57 * Existence of this object ensures the existence of the log.
58 * Defined first so that the log is available to the constructors of other mem bers.
59 */
60 LogQueueReference lqr;
55 61
56 CPluginTab* m_tab; 62 CPluginTab* m_tab;
57 63
58 public: 64 public:
59 65
60 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) 66 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS)
61 67
62 DECLARE_PROTECT_FINAL_CONSTRUCT() 68 DECLARE_PROTECT_FINAL_CONSTRUCT()
63 69
64 BEGIN_COM_MAP(CPluginClass) 70 BEGIN_COM_MAP(CPluginClass)
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 static CComAutoCriticalSection s_criticalSectionWindow; 186 static CComAutoCriticalSection s_criticalSectionWindow;
181 187
182 // Async browser 188 // Async browser
183 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; 189 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2;
184 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); 190 static CComQIPtr<IWebBrowser2> GetAsyncBrowser();
185 }; 191 };
186 192
187 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) 193 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass)
188 194
189 #endif // _PLUGIN_CLASS_H_ 195 #endif // _PLUGIN_CLASS_H_
OLDNEW
« no previous file with comments | « src/plugin/Placeholder.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld