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

Unified Diff: src/plugin/PluginClass.h

Issue 29333107: Issue #1652, #3456 - Replace 's_asyncWebBrowser2' with thread-safe facilities
Patch Set: rebase only Created July 27, 2016, 10:26 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 | « src/plugin/Instances.h ('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
===================================================================
--- a/src/plugin/PluginClass.h
+++ b/src/plugin/PluginClass.h
@@ -28,7 +28,7 @@
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
-#include <set>
+#include <mutex>
#include "NotificationMessage.h"
@@ -50,6 +50,7 @@
{
friend class CPluginTab;
+ friend class AnyCurrentSiteBrowser;
private:
@@ -102,7 +103,6 @@
public:
HWND GetBrowserHWND() const;
bool IsRootBrowser(IWebBrowser2*);
-
static CPluginMimeFilterClient* s_mimeFilter;
private:
@@ -135,7 +135,6 @@
void Unadvise();
void ShowStatusBar();
- bool IsStatusBarEnabled();
/**
* A browser interface pointer to our site object
@@ -143,6 +142,11 @@
* It's values are set and reset solely in SetSite().
*/
CComPtr<IWebBrowser2> m_webBrowser2;
+ /**
+ * Synchronizes SetSite() with references to our site pointer.
+ */
+ std::mutex siteGuard;
+
HWND m_hBrowserWnd;
HWND m_hTabWnd;
HWND m_hStatusBarWnd;
@@ -175,13 +179,8 @@
static bool s_isMainThreadDone;
static HINSTANCE s_hUxtheme;
- static std::set<CPluginClass*> s_instances;
static CComAutoCriticalSection s_criticalSectionLocal;
static CComAutoCriticalSection s_criticalSectionWindow;
-
- // Async browser
- static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2;
- static CComQIPtr<IWebBrowser2> GetAsyncBrowser();
};
OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass)
« no previous file with comments | « src/plugin/Instances.h ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld