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

Unified Diff: src/plugin/PluginClass.h

Issue 29323561: Issue #3383 - Rewrite and simplify browser-site handling in CPluginClass (Closed)
Patch Set: initialization; shorten comment Created Dec. 3, 2015, 2:23 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 | « no previous file | 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
===================================================================
--- a/src/plugin/PluginClass.h
+++ b/src/plugin/PluginClass.h
@@ -79,15 +79,10 @@
CPluginClass();
~CPluginClass();
- HRESULT FinalConstruct();
- void FinalRelease();
-
// IObjectWithSite
-
STDMETHOD(SetSite)(IUnknown *pUnkSite);
// IOleCommandTarget
-
STDMETHOD(QueryStatus)(const GUID* pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT* pCmdText);
STDMETHOD(Exec)(const GUID*, DWORD nCmdID, DWORD, VARIANTARG*, VARIANTARG* pvaOut);
@@ -96,7 +91,6 @@
CPluginTab* GetTab();
void UpdateStatusBar();
- static DWORD WINAPI MainThreadProc(LPVOID pParam);
private:
@@ -108,9 +102,7 @@
public:
HWND GetBrowserHWND() const;
- HWND GetTabHWND() const;
- CComQIPtr<IWebBrowser2> GetBrowser() const;
-
+ bool IsRootBrowser(IWebBrowser2*);
static CPluginMimeFilterClient* s_mimeFilter;
@@ -146,9 +138,12 @@
void ShowStatusBar();
bool IsStatusBarEnabled();
-public:
- CComQIPtr<IWebBrowser2> m_webBrowser2;
-private:
+ /**
+ * 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;
@@ -180,14 +175,10 @@
static HANDLE s_hMainThread;
static bool s_isMainThreadDone;
- static HANDLE GetMainThreadHandle();
- static bool IsMainThreadDone(HANDLE mainThread);
-
static HINSTANCE s_hUxtheme;
static std::set<CPluginClass*> s_instances;
static std::map<DWORD,CPluginClass*> s_threadInstances;
static CComAutoCriticalSection s_criticalSectionLocal;
- static CComAutoCriticalSection s_criticalSectionBrowser;
static CComAutoCriticalSection s_criticalSectionWindow;
// Async browser
« no previous file with comments | « no previous file | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld