Left: | ||
Right: |
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-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 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 | 43 |
44 | 44 |
45 class ATL_NO_VTABLE CPluginClass : | 45 class ATL_NO_VTABLE CPluginClass : |
46 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, | 46 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, |
47 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>, | 47 public ATL::CComCoClass<CPluginClass, &CLSID_PluginClass>, |
48 public ATL::IObjectWithSiteImpl<CPluginClass>, | 48 public ATL::IObjectWithSiteImpl<CPluginClass>, |
49 public IOleCommandTarget, | 49 public IOleCommandTarget, |
50 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> |
51 { | 51 { |
52 | 52 |
53 friend class CPluginTab; | 53 // friend class CPluginTab; |
sergei
2016/01/29 10:03:20
It can be removed
Eric
2016/02/03 18:03:20
Done.
| |
54 | 54 |
55 private: | 55 private: |
56 | 56 |
57 CPluginTab* m_tab; | 57 CPluginTab* m_tab; |
58 | 58 |
59 public: | 59 public: |
60 | 60 |
61 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) | 61 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) |
62 | 62 |
63 DECLARE_PROTECT_FINAL_CONSTRUCT() | 63 DECLARE_PROTECT_FINAL_CONSTRUCT() |
64 | 64 |
65 BEGIN_COM_MAP(CPluginClass) | 65 BEGIN_COM_MAP(CPluginClass) |
66 COM_INTERFACE_ENTRY(IObjectWithSite) | 66 COM_INTERFACE_ENTRY(IObjectWithSite) |
67 COM_INTERFACE_ENTRY(IOleCommandTarget) | 67 COM_INTERFACE_ENTRY(IOleCommandTarget) |
68 END_COM_MAP() | 68 END_COM_MAP() |
69 | 69 |
70 BEGIN_SINK_MAP(CPluginClass) | 70 BEGIN_SINK_MAP(CPluginClass) |
71 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_BEFORENAVIGATE2, OnBeforeNa vigate2) | 71 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_BEFORENAVIGATE2, OnBeforeNa vigate2) |
72 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADBEGIN, OnDownloadBe gin) | |
72 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADCOMPLETE, OnDownloa dComplete) | 73 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADCOMPLETE, OnDownloa dComplete) |
73 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumen tComplete) | 74 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumen tComplete) |
74 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED, OnWindo wStateChanged) | 75 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED, OnWindo wStateChanged) |
75 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnComma ndStateChange) | 76 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnComma ndStateChange) |
76 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnOnQuit) | 77 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnOnQuit) |
77 END_SINK_MAP() | 78 END_SINK_MAP() |
78 | 79 |
79 CPluginClass(); | 80 CPluginClass(); |
80 ~CPluginClass(); | 81 ~CPluginClass(); |
81 | 82 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); | 122 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); |
122 static void FirstRunThread(); | 123 static void FirstRunThread(); |
123 | 124 |
124 void STDMETHODCALLTYPE OnBeforeNavigate2(IDispatch* pDisp /**< [in] */, | 125 void STDMETHODCALLTYPE OnBeforeNavigate2(IDispatch* pDisp /**< [in] */, |
125 VARIANT* URL /**< [in] */, | 126 VARIANT* URL /**< [in] */, |
126 VARIANT* Flags /**< [in] */, | 127 VARIANT* Flags /**< [in] */, |
127 VARIANT* TargetFrameName /**< [in] */ , | 128 VARIANT* TargetFrameName /**< [in] */ , |
128 VARIANT* PostData /**< [in] */, | 129 VARIANT* PostData /**< [in] */, |
129 VARIANT* Headers /**< [in] */, | 130 VARIANT* Headers /**< [in] */, |
130 VARIANT_BOOL* Cancel /* [in, out] */) ; | 131 VARIANT_BOOL* Cancel /* [in, out] */) ; |
132 void STDMETHODCALLTYPE OnDownloadBegin(); | |
131 void STDMETHODCALLTYPE OnDownloadComplete(); | 133 void STDMETHODCALLTYPE OnDownloadComplete(); |
132 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); | 134 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); |
133 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); | 135 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); |
134 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; | 136 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; |
135 void STDMETHODCALLTYPE OnOnQuit(); | 137 void STDMETHODCALLTYPE OnOnQuit(); |
136 void Unadvise(); | 138 void Unadvise(); |
137 | 139 |
138 void ShowStatusBar(); | 140 void ShowStatusBar(); |
139 bool IsStatusBarEnabled(); | 141 bool IsStatusBarEnabled(); |
140 | 142 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 185 |
184 // Async browser | 186 // Async browser |
185 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 187 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
186 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 188 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
187 }; | 189 }; |
188 | 190 |
189 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 191 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
190 | 192 |
191 | 193 |
192 #endif // _PLUGIN_CLASS_H_ | 194 #endif // _PLUGIN_CLASS_H_ |
OLD | NEW |