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

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

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: Created Dec. 10, 2014, 5:12 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 class CPluginDomTraverser; 4 class CPluginDomTraverser;
5 5
6 #include "PluginUserSettings.h" 6 #include "PluginUserSettings.h"
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #include "../shared/CriticalSection.h" 8 #include "../shared/CriticalSection.h"
9 #include <thread> 9 #include <thread>
10 #include <atomic> 10 #include <atomic>
(...skipping 29 matching lines...) Expand all
40 std::auto_ptr<CPluginFilter> m_filter; 40 std::auto_ptr<CPluginFilter> m_filter;
41 private: 41 private:
42 static int s_whitelistVersion; 42 static int s_whitelistVersion;
43 43
44 void ThreadProc(); 44 void ThreadProc();
45 CComAutoCriticalSection m_criticalSectionCache; 45 CComAutoCriticalSection m_criticalSectionCache;
46 std::set<CString> m_cacheFrames; 46 std::set<CString> m_cacheFrames;
47 std::wstring m_cacheDomain; 47 std::wstring m_cacheDomain;
48 void SetDocumentUrl(const CString& url); 48 void SetDocumentUrl(const CString& url);
49 void InjectABP(IWebBrowser2* browser); 49 void InjectABP(IWebBrowser2* browser);
50 bool IsTraverserEnabled();
51 bool IsCSSInjectionEnabled();
50 public: 52 public:
51 53
52 CPluginTabBase(CPluginClass* plugin); 54 CPluginTabBase(CPluginClass* plugin);
53 ~CPluginTabBase(); 55 ~CPluginTabBase();
54 56
55 std::wstring GetDocumentDomain(); 57 std::wstring GetDocumentDomain();
56 CString GetDocumentUrl(); 58 CString GetDocumentUrl();
57 virtual void OnActivate(); 59 virtual void OnActivate();
58 virtual void OnUpdate(); 60 virtual void OnUpdate();
59 virtual void OnNavigate(const CString& url); 61 virtual void OnNavigate(const CString& url);
60 virtual void OnDownloadComplete(IWebBrowser2* browser); 62 virtual void OnDownloadComplete(IWebBrowser2* browser);
61 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser); 63 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser);
62 static DWORD WINAPI TabThreadProc(LPVOID pParam); 64 static DWORD WINAPI TabThreadProc(LPVOID pParam);
63 void CacheFrame(const CString& url); 65 void CacheFrame(const CString& url);
64 bool IsFrameCached(const CString& url); 66 bool IsFrameCached(const CString& url);
65 void ClearFrameCache(const std::wstring& domain=L""); 67 void ClearFrameCache(const std::wstring& domain=L"");
66 68
67 }; 69 };
68 70
69 71
70 #endif // _PLUGIN_TAB_BASE_H_ 72 #endif // _PLUGIN_TAB_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld