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

Delta Between Two Patch Sets: src/plugin/PluginClass.cpp

Issue 11427013: Appear fast for IE (Closed)
Left Patch Set: Created Aug. 7, 2013, 5:44 a.m.
Right Patch Set: Comments addressed Created Aug. 7, 2013, 4:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 m_webBrowser2 = unknownSite; 252 m_webBrowser2 = unknownSite;
253 } 253 }
254 s_criticalSectionBrowser.Unlock(); 254 s_criticalSectionBrowser.Unlock();
255 255
256 //register the mimefilter 256 //register the mimefilter
257 //and only mimefilter 257 //and only mimefilter
258 //on some few computers the mimefilter does not get properly registered when it is done on another thread 258 //on some few computers the mimefilter does not get properly registered when it is done on another thread
259 259
260 s_criticalSectionLocal.Lock(); 260 s_criticalSectionLocal.Lock();
261 { 261 {
262 // We always register on startup and then check if we should do that in a seperate thread 262 // Always register on startup, then check if we need to unregister in a se parate thread
Felix Dahlke 2013/08/07 09:34:49 I didn't immediately get this, how about: // Alwa
263 s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance(); 263 s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance();
264 s_asyncWebBrowser2 = unknownSite; 264 s_asyncWebBrowser2 = unknownSite;
265 s_instances.Add(this); 265 s_instances.Add(this);
266 } 266 }
267 s_criticalSectionLocal.Unlock(); 267 s_criticalSectionLocal.Unlock();
268 268
269 try 269 try
270 { 270 {
271 // Check if loaded as BHO 271 // Check if loaded as BHO
272 if (GetBrowser()) 272 if (GetBrowser())
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 break; 724 break;
725 } 725 }
726 726
727 return VARIANT_TRUE; 727 return VARIANT_TRUE;
728 } 728 }
729 729
730 bool CPluginClass::InitObject(bool bBHO) 730 bool CPluginClass::InitObject(bool bBHO)
731 { 731 {
732 CPluginSettings* settings = CPluginSettings::GetInstance(); 732 CPluginSettings* settings = CPluginSettings::GetInstance();
733 733
734 // Unregister, if disabled
Felix Dahlke 2013/08/07 09:34:49 This comment is kinda redundant, I think.
735 if (!settings->GetPluginEnabled()) 734 if (!settings->GetPluginEnabled())
736 { 735 {
737 s_mimeFilter->Unregister(); 736 s_mimeFilter->Unregister();
738 } 737 }
739 738
740 // Load theme module 739 // Load theme module
741 s_criticalSectionLocal.Lock(); 740 s_criticalSectionLocal.Lock();
742 { 741 {
743 if (!s_hUxtheme) 742 if (!s_hUxtheme)
744 { 743 {
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 } 1909 }
1911 } 1910 }
1912 } 1911 }
1913 1912
1914 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1913 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1915 } 1914 }
1916 1915
1917 return hTabWnd; 1916 return hTabWnd;
1918 1917
1919 } 1918 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld