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

Side by Side Diff: src/plugin/PluginClass.cpp

Issue 5558809044975616: Noissue - Dead code removal (Closed)
Patch Set: Created Oct. 2, 2014, 9:57 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/PluginStdAfx.h » ('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 #include "PluginFilter.h" 6 #include "PluginFilter.h"
7 #include "PluginMimeFilterClient.h" 7 #include "PluginMimeFilterClient.h"
8 #include "PluginClient.h" 8 #include "PluginClient.h"
9 #include "PluginClientFactory.h" 9 #include "PluginClientFactory.h"
10 #include "PluginMutex.h" 10 #include "PluginMutex.h"
(...skipping 24 matching lines...) Expand all
35 ATOM CPluginClass::s_atomPaneClass = NULL; 35 ATOM CPluginClass::s_atomPaneClass = NULL;
36 HINSTANCE CPluginClass::s_hUxtheme = NULL; 36 HINSTANCE CPluginClass::s_hUxtheme = NULL;
37 std::set<CPluginClass*> CPluginClass::s_instances; 37 std::set<CPluginClass*> CPluginClass::s_instances;
38 std::map<DWORD, CPluginClass*> CPluginClass::s_threadInstances; 38 std::map<DWORD, CPluginClass*> CPluginClass::s_threadInstances;
39 39
40 CComAutoCriticalSection CPluginClass::s_criticalSectionLocal; 40 CComAutoCriticalSection CPluginClass::s_criticalSectionLocal;
41 CComAutoCriticalSection CPluginClass::s_criticalSectionBrowser; 41 CComAutoCriticalSection CPluginClass::s_criticalSectionBrowser;
42 CComAutoCriticalSection CPluginClass::s_criticalSectionWindow; 42 CComAutoCriticalSection CPluginClass::s_criticalSectionWindow;
43 43
44 CComQIPtr<IWebBrowser2> CPluginClass::s_asyncWebBrowser2; 44 CComQIPtr<IWebBrowser2> CPluginClass::s_asyncWebBrowser2;
45 std::map<UINT,CString> CPluginClass::s_menuDomains;
46 45
47 /* 46 /*
48 * Without namespace declaration, the identifier "Rectangle" is ambiguous 47 * Without namespace declaration, the identifier "Rectangle" is ambiguous
49 * See http://msdn.microsoft.com/en-us/library/windows/desktop/dd162898(v=vs.85) .aspx 48 * See http://msdn.microsoft.com/en-us/library/windows/desktop/dd162898(v=vs.85) .aspx
50 */ 49 */
51 namespace AdblockPlus 50 namespace AdblockPlus
52 { 51 {
53 /** 52 /**
54 * Replacement for ATL type CRect. 53 * Replacement for ATL type CRect.
55 */ 54 */
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 // Invalidate and redraw the control 1374 // Invalidate and redraw the control
1376 UpdateStatusBar(); 1375 UpdateStatusBar();
1377 } 1376 }
1378 1377
1379 1378
1380 bool CPluginClass::SetMenuBar(HMENU hMenu, const CString& url) 1379 bool CPluginClass::SetMenuBar(HMENU hMenu, const CString& url)
1381 { 1380 {
1382 DEBUG_GENERAL("SetMenuBar"); 1381 DEBUG_GENERAL("SetMenuBar");
1383 1382
1384 std::wstring ctext; 1383 std::wstring ctext;
1385
1386 s_criticalSectionLocal.Lock();
1387 {
1388 s_menuDomains.clear();
1389 }
1390 s_criticalSectionLocal.Unlock();
1391
1392 Dictionary* dictionary = Dictionary::GetInstance(); 1384 Dictionary* dictionary = Dictionary::GetInstance();
1393 1385
1394 MENUITEMINFOW fmii; 1386 MENUITEMINFOW fmii;
1395 memset(&fmii, 0, sizeof(MENUITEMINFO)); 1387 memset(&fmii, 0, sizeof(MENUITEMINFO));
1396 fmii.cbSize = sizeof(MENUITEMINFO); 1388 fmii.cbSize = sizeof(MENUITEMINFO);
1397 1389
1398 MENUITEMINFOW miiSep; 1390 MENUITEMINFOW miiSep;
1399 memset(&miiSep, 0, sizeof(MENUITEMINFO)); 1391 memset(&miiSep, 0, sizeof(MENUITEMINFO));
1400 miiSep.cbSize = sizeof(MENUITEMINFO); 1392 miiSep.cbSize = sizeof(MENUITEMINFO);
1401 miiSep.fMask = MIIM_TYPE | MIIM_FTYPE; 1393 miiSep.fMask = MIIM_TYPE | MIIM_FTYPE;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 1616
1625 HICON CPluginClass::GetStatusBarIcon(const CString& url) 1617 HICON CPluginClass::GetStatusBarIcon(const CString& url)
1626 { 1618 {
1627 // use the disable icon as defualt, if the client doesn't exists 1619 // use the disable icon as defualt, if the client doesn't exists
1628 HICON hIcon = GetIcon(ICON_PLUGIN_DEACTIVATED); 1620 HICON hIcon = GetIcon(ICON_PLUGIN_DEACTIVATED);
1629 1621
1630 CPluginTab* tab = GetTab(::GetCurrentThreadId()); 1622 CPluginTab* tab = GetTab(::GetCurrentThreadId());
1631 if (tab) 1623 if (tab)
1632 { 1624 {
1633 CPluginClient* client = CPluginClient::GetInstance(); 1625 CPluginClient* client = CPluginClient::GetInstance();
1634 if (!CPluginSettings::GetInstance()->IsPluginEnabled()) 1626 if (client->IsWhitelistedUrl(std::wstring(url)))
Oleksandr 2014/10/03 08:19:59 This should still run only if plugin is enabled. I
Eric 2014/10/07 15:57:49 Done.
1635 {
1636 }
1637 else if (client->IsWhitelistedUrl(std::wstring(url)))
1638 { 1627 {
1639 hIcon = GetIcon(ICON_PLUGIN_DISABLED); 1628 hIcon = GetIcon(ICON_PLUGIN_DISABLED);
1640 } 1629 }
1641 else 1630 else
1642 { 1631 {
1643 CPluginSettings* settings = CPluginSettings::GetInstance(); 1632 CPluginSettings* settings = CPluginSettings::GetInstance();
1644 hIcon = GetIcon(ICON_PLUGIN_ENABLED); 1633 hIcon = GetIcon(ICON_PLUGIN_ENABLED);
1645 } 1634 }
1646 } 1635 }
1647 return hIcon; 1636 return hIcon;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 } 1964 }
1976 } 1965 }
1977 } 1966 }
1978 1967
1979 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1968 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1980 } 1969 }
1981 1970
1982 return hTabWnd; 1971 return hTabWnd;
1983 1972
1984 } 1973 }
OLDNEW
« no previous file with comments | « src/plugin/PluginClass.h ('k') | src/plugin/PluginStdAfx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld