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

Unified Diff: src/plugin/PluginClass.cpp

Issue 5113230347206656: Issue #1356 - Improve detection of the issuer of the request (Closed)
Patch Set: Created Oct. 7, 2014, 9:51 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/PluginClass.h ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1137,6 +1137,26 @@
return tab;
}
+CPluginTab* CPluginClass::GetTab(const std::wstring& url)
+{
+ CPluginTab* tab = NULL;
+
+ s_criticalSectionLocal.Lock();
+ {
+ std::map<DWORD,CPluginClass*>::const_iterator it;
+ for (it = s_threadInstances.begin(); it != s_threadInstances.end(); it++)
+ {
+ if (it->second->GetBrowserUrl() == url.c_str())
+ {
+ return it->second->m_tab;
+ }
+ }
+ }
+ s_criticalSectionLocal.Unlock();
+
+ return tab;
+}
+
STDMETHODIMP CPluginClass::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT* pCmdText)
{
« no previous file with comments | « src/plugin/PluginClass.h ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld