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

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

Issue 29334397: Issue #2230, #3391 - Load filters on "download begin" event
Patch Set: address comments Created Feb. 3, 2016, 6:04 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/DetachedInitialization.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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
54
55 private: 53 private:
56 54
57 CPluginTab* m_tab; 55 CPluginTab* m_tab;
58 56
59 public: 57 public:
60 58
61 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) 59 DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS)
62 60
63 DECLARE_PROTECT_FINAL_CONSTRUCT() 61 DECLARE_PROTECT_FINAL_CONSTRUCT()
64 62
65 BEGIN_COM_MAP(CPluginClass) 63 BEGIN_COM_MAP(CPluginClass)
66 COM_INTERFACE_ENTRY(IObjectWithSite) 64 COM_INTERFACE_ENTRY(IObjectWithSite)
67 COM_INTERFACE_ENTRY(IOleCommandTarget) 65 COM_INTERFACE_ENTRY(IOleCommandTarget)
68 END_COM_MAP() 66 END_COM_MAP()
69 67
70 BEGIN_SINK_MAP(CPluginClass) 68 BEGIN_SINK_MAP(CPluginClass)
71 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_BEFORENAVIGATE2, OnBeforeNa vigate2) 69 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_BEFORENAVIGATE2, OnBeforeNa vigate2)
70 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADBEGIN, OnDownloadBe gin)
72 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADCOMPLETE, OnDownloa dComplete) 71 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADCOMPLETE, OnDownloa dComplete)
73 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumen tComplete) 72 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumen tComplete)
74 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED, OnWindo wStateChanged) 73 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED, OnWindo wStateChanged)
75 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnComma ndStateChange) 74 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnComma ndStateChange)
76 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnOnQuit) 75 SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnOnQuit)
77 END_SINK_MAP() 76 END_SINK_MAP()
78 77
79 CPluginClass(); 78 CPluginClass();
80 ~CPluginClass(); 79 ~CPluginClass();
81 80
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 120 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
122 static void FirstRunThread(); 121 static void FirstRunThread();
123 122
124 void STDMETHODCALLTYPE OnBeforeNavigate2(IDispatch* pDisp /**< [in] */, 123 void STDMETHODCALLTYPE OnBeforeNavigate2(IDispatch* pDisp /**< [in] */,
125 VARIANT* URL /**< [in] */, 124 VARIANT* URL /**< [in] */,
126 VARIANT* Flags /**< [in] */, 125 VARIANT* Flags /**< [in] */,
127 VARIANT* TargetFrameName /**< [in] */ , 126 VARIANT* TargetFrameName /**< [in] */ ,
128 VARIANT* PostData /**< [in] */, 127 VARIANT* PostData /**< [in] */,
129 VARIANT* Headers /**< [in] */, 128 VARIANT* Headers /**< [in] */,
130 VARIANT_BOOL* Cancel /* [in, out] */) ; 129 VARIANT_BOOL* Cancel /* [in, out] */) ;
130 void STDMETHODCALLTYPE OnDownloadBegin();
131 void STDMETHODCALLTYPE OnDownloadComplete(); 131 void STDMETHODCALLTYPE OnDownloadComplete();
132 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); 132 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/);
133 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); 133 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask);
134 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; 134 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ;
135 void STDMETHODCALLTYPE OnOnQuit(); 135 void STDMETHODCALLTYPE OnOnQuit();
136 void Unadvise(); 136 void Unadvise();
137 137
138 void ShowStatusBar(); 138 void ShowStatusBar();
139 bool IsStatusBarEnabled(); 139 bool IsStatusBarEnabled();
140 140
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Async browser 184 // Async browser
185 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; 185 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2;
186 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); 186 static CComQIPtr<IWebBrowser2> GetAsyncBrowser();
187 }; 187 };
188 188
189 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) 189 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass)
190 190
191 191
192 #endif // _PLUGIN_CLASS_H_ 192 #endif // _PLUGIN_CLASS_H_
OLDNEW
« no previous file with comments | « src/plugin/DetachedInitialization.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld