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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/PluginClass.h ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginClass.h" 3 #include "PluginClass.h"
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #include "PluginSystem.h" 5 #include "PluginSystem.h"
6 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginMimeFilterClient.h" 9 #include "PluginMimeFilterClient.h"
10 #include "PluginClient.h" 10 #include "PluginClient.h"
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 if (it != s_threadInstances.end()) 1130 if (it != s_threadInstances.end())
1131 { 1131 {
1132 tab = it->second->m_tab; 1132 tab = it->second->m_tab;
1133 } 1133 }
1134 } 1134 }
1135 s_criticalSectionLocal.Unlock(); 1135 s_criticalSectionLocal.Unlock();
1136 1136
1137 return tab; 1137 return tab;
1138 } 1138 }
1139 1139
1140 CPluginTab* CPluginClass::GetTab(const std::wstring& url)
1141 {
1142 CPluginTab* tab = NULL;
1143
1144 s_criticalSectionLocal.Lock();
1145 {
1146 std::map<DWORD,CPluginClass*>::const_iterator it;
1147 for (it = s_threadInstances.begin(); it != s_threadInstances.end(); it++)
1148 {
1149 if (it->second->GetBrowserUrl() == url.c_str())
1150 {
1151 return it->second->m_tab;
1152 }
1153 }
1154 }
1155 s_criticalSectionLocal.Unlock();
1156
1157 return tab;
1158 }
1159
1140 1160
1141 STDMETHODIMP CPluginClass::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds, O LECMD prgCmds[], OLECMDTEXT* pCmdText) 1161 STDMETHODIMP CPluginClass::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds, O LECMD prgCmds[], OLECMDTEXT* pCmdText)
1142 { 1162 {
1143 if (cCmds == 0) return E_INVALIDARG; 1163 if (cCmds == 0) return E_INVALIDARG;
1144 if (prgCmds == 0) return E_POINTER; 1164 if (prgCmds == 0) return E_POINTER;
1145 1165
1146 prgCmds[0].cmdf = OLECMDF_ENABLED; 1166 prgCmds[0].cmdf = OLECMDF_ENABLED;
1147 1167
1148 return S_OK; 1168 return S_OK;
1149 } 1169 }
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 } 2021 }
2002 } 2022 }
2003 } 2023 }
2004 2024
2005 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 2025 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
2006 } 2026 }
2007 2027
2008 return hTabWnd; 2028 return hTabWnd;
2009 2029
2010 } 2030 }
OLDNEW
« 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