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

Side by Side Diff: src/plugin/PluginTabBase.h

Issue 5948518908821504: Issue #1158 - removed unnecessary definitions and #ifdef/#else/#endif sections (Closed)
Patch Set: Created Aug. 6, 2014, 7:38 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
OLDNEW
1 #ifndef _PLUGIN_TAB_BASE_H_ 1 #ifndef _PLUGIN_TAB_BASE_H_
2 #define _PLUGIN_TAB_BASE_H_ 2 #define _PLUGIN_TAB_BASE_H_
3 3
4
5 #ifdef SUPPORT_DOM_TRAVERSER
6 class CPluginDomTraverser; 4 class CPluginDomTraverser;
7 #endif
8 5
9 #include "PluginUserSettings.h" 6 #include "PluginUserSettings.h"
10 #include "PluginFilter.h" 7 #include "PluginFilter.h"
11 #include "../shared/CriticalSection.h" 8 #include "../shared/CriticalSection.h"
12 #include <thread> 9 #include <thread>
13 #include <atomic> 10 #include <atomic>
14 11
15 class CPluginClass; 12 class CPluginClass;
16 13
17 14
(...skipping 10 matching lines...) Expand all
28 CString m_documentDomain; 25 CString m_documentDomain;
29 CString m_documentUrl; 26 CString m_documentUrl;
30 CPluginUserSettings m_pluginUserSettings; 27 CPluginUserSettings m_pluginUserSettings;
31 public: 28 public:
32 CPluginClass* m_plugin; 29 CPluginClass* m_plugin;
33 protected: 30 protected:
34 bool m_isActivated; 31 bool m_isActivated;
35 32
36 std::thread m_thread; 33 std::thread m_thread;
37 std::atomic<bool> m_continueThreadRunning; 34 std::atomic<bool> m_continueThreadRunning;
38
39 #ifdef SUPPORT_DOM_TRAVERSER
40 CPluginDomTraverser* m_traverser; 35 CPluginDomTraverser* m_traverser;
41 #endif
42
43 static int s_dictionaryVersion; 36 static int s_dictionaryVersion;
44 static int s_settingsVersion; 37 static int s_settingsVersion;
45 #ifdef SUPPORT_FILTER
46 static int s_filterVersion; 38 static int s_filterVersion;
47 public: 39 public:
48 std::auto_ptr<CPluginFilter> m_filter; 40 std::auto_ptr<CPluginFilter> m_filter;
49 private: 41 private:
50 #endif
51 #ifdef SUPPORT_WHITELIST
52 static int s_whitelistVersion; 42 static int s_whitelistVersion;
53 #endif
54 #ifdef SUPPORT_CONFIG
55 static int s_configVersion;
56 #endif
57 43
58 void ThreadProc(); 44 void ThreadProc();
59
60 #ifdef SUPPORT_FRAME_CACHING
61 CComAutoCriticalSection m_criticalSectionCache; 45 CComAutoCriticalSection m_criticalSectionCache;
62 std::set<CString> m_cacheFrames; 46 std::set<CString> m_cacheFrames;
63 CString m_cacheDomain; 47 CString m_cacheDomain;
64 #endif
65
66 void SetDocumentUrl(const CString& url); 48 void SetDocumentUrl(const CString& url);
67 void InjectABP(IWebBrowser2* browser); 49 void InjectABP(IWebBrowser2* browser);
68 public: 50 public:
69 51
70 CPluginTabBase(CPluginClass* plugin); 52 CPluginTabBase(CPluginClass* plugin);
71 ~CPluginTabBase(); 53 ~CPluginTabBase();
72 54
73 CString GetDocumentDomain(); 55 CString GetDocumentDomain();
74 CString GetDocumentUrl(); 56 CString GetDocumentUrl();
75
76 virtual void OnActivate(); 57 virtual void OnActivate();
77 virtual void OnUpdate(); 58 virtual void OnUpdate();
78 virtual void OnNavigate(const CString& url); 59 virtual void OnNavigate(const CString& url);
79 virtual void OnDownloadComplete(IWebBrowser2* browser); 60 virtual void OnDownloadComplete(IWebBrowser2* browser);
80 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser); 61 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser);
81
82 static DWORD WINAPI TabThreadProc(LPVOID pParam); 62 static DWORD WINAPI TabThreadProc(LPVOID pParam);
83
84 #ifdef SUPPORT_FRAME_CACHING
85 void CacheFrame(const CString& url); 63 void CacheFrame(const CString& url);
86 bool IsFrameCached(const CString& url); 64 bool IsFrameCached(const CString& url);
87 void ClearFrameCache(const CString& domain=""); 65 void ClearFrameCache(const CString& domain="");
88 #endif
89 66
90 }; 67 };
91 68
92 69
93 #endif // _PLUGIN_TAB_BASE_H_ 70 #endif // _PLUGIN_TAB_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld