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

Unified Diff: src/plugin/PluginClass.h

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: rebase Created Feb. 25, 2016, 5:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.h
diff --git a/src/plugin/PluginClass.h b/src/plugin/PluginClass.h
index 95c2e23d499e668d34163a3504e0833af6a0ff13..b46ddc93d618c6d5f7d0d65117b49c7fdaf830e2 100644
--- a/src/plugin/PluginClass.h
+++ b/src/plugin/PluginClass.h
@@ -40,7 +40,7 @@
#define WM_LAUNCH_INFO (WM_APP + 10)
class CPluginMimeFilterClient;
-
+class WebBrowserEventsListener;
class ATL_NO_VTABLE CPluginClass :
public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>,
@@ -52,10 +52,6 @@ class ATL_NO_VTABLE CPluginClass :
friend class CPluginTab;
-private:
-
- CPluginTab* m_tab;
-
public:
DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS)
@@ -70,7 +66,6 @@ public:
BEGIN_SINK_MAP(CPluginClass)
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_BEFORENAVIGATE2, OnBeforeNavigate2)
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOWNLOADCOMPLETE, OnDownloadComplete)
- SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumentComplete)
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED, OnWindowStateChanged)
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnCommandStateChange)
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnOnQuit)
@@ -129,21 +124,15 @@ private:
VARIANT* Headers /**< [in] */,
VARIANT_BOOL* Cancel /* [in, out] */);
void STDMETHODCALLTYPE OnDownloadComplete();
- void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT* /*urlOrPidl*/);
void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask);
void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable);
void STDMETHODCALLTYPE OnOnQuit();
void Unadvise();
+ void EnsureWebBrowserConnected(const ATL::CComPtr<IWebBrowser2>& webBrowser);
void ShowStatusBar();
bool IsStatusBarEnabled();
- /**
- * A browser interface pointer to our site object
- *
- * It's values are set and reset solely in SetSite().
- */
- CComPtr<IWebBrowser2> m_webBrowser2;
HWND m_hBrowserWnd;
HWND m_hTabWnd;
HWND m_hStatusBarWnd;
@@ -152,6 +141,15 @@ private:
WNDPROC m_pWndProcStatus;
int m_nPaneWidth;
HANDLE m_hTheme;
+ struct Data
+ {
+ std::map<IWebBrowser2*, WebBrowserEventsListener*> connectedWebBrowsersCache;
+ std::unique_ptr<CPluginTab> tab;
+ ATL::CComPtr<IWebBrowser2> webBrowser2;
+ };
+ // we need to have it as a shared pointer to get weak pointer to it to avoid
+ // wrong usage after destroying of this class.
+ std::shared_ptr<Data> m_data;
CriticalSection m_csStatusBar;
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld