Index: src/plugin/PluginClass.h |
diff --git a/src/plugin/PluginClass.h b/src/plugin/PluginClass.h |
index 00e4321095ec5201c202980bfa83eb0d6f54358b..1a304d85524b92500c91337c28ade7c7809441e4 100644 |
--- a/src/plugin/PluginClass.h |
+++ b/src/plugin/PluginClass.h |
@@ -25,7 +25,7 @@ |
#define WM_WHITELIST_DOMAIN (WM_LAUNCH_INFO + 1) |
class CPluginMimeFilterClient; |
- |
+class WebBrowserEventsListener; |
class ATL_NO_VTABLE CPluginClass : |
public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, |
@@ -37,10 +37,6 @@ class ATL_NO_VTABLE CPluginClass : |
friend class CPluginTab; |
-private: |
- |
- CPluginTab* m_tab; |
- |
public: |
DECLARE_REGISTRY_RESOURCEID(IDR_PLUGIN_CLASS) |
@@ -134,8 +130,6 @@ private: |
void ShowStatusBar(); |
bool IsStatusBarEnabled(); |
-public: |
- CComQIPtr<IWebBrowser2> m_webBrowser2; |
private: |
HWND m_hBrowserWnd; |
HWND m_hTabWnd; |
@@ -145,6 +139,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; |