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

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

Issue 5447868882092032: Issue 1793 - check whether the frame is whitelisted before injecting CSS (Closed)
Patch Set: update Created Jan. 13, 2015, 3:20 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 _ADBLOCK_PLUS_CLIENT_H_ 1 #ifndef _ADBLOCK_PLUS_CLIENT_H_
2 #define _ADBLOCK_PLUS_CLIENT_H_ 2 #define _ADBLOCK_PLUS_CLIENT_H_
3 3
4 4
5 #include "PluginTypedef.h" 5 #include "PluginTypedef.h"
6 #include "PluginClientBase.h" 6 #include "PluginClientBase.h"
7 #include "../shared/Communication.h" 7 #include "../shared/Communication.h"
8 #include "../shared/CriticalSection.h" 8 #include "../shared/CriticalSection.h"
9 9
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 ~CAdblockPlusClient(); 46 ~CAdblockPlusClient();
47 47
48 static CAdblockPlusClient* GetInstance(); 48 static CAdblockPlusClient* GetInstance();
49 49
50 // Removes the url from the list of whitelisted urls if present 50 // Removes the url from the list of whitelisted urls if present
51 // Only called from ui thread 51 // Only called from ui thread
52 bool ShouldBlock(const std::wstring& src, int contentType, const std::wstring& domain, bool addDebug=false); 52 bool ShouldBlock(const std::wstring& src, int contentType, const std::wstring& domain, bool addDebug=false);
53 53
54 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent, CPluginFilter* filter); 54 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent, CPluginFilter* filter);
55 bool IsWhitelistedUrl(const std::wstring& url); 55 bool IsWhitelistedUrl(const std::wstring& url, const std::vector<std::string>& frameHierarchy = std::vector<std::string>());
56 bool IsElemhideWhitelistedOnDomain(const std::wstring& url); 56 bool IsElemhideWhitelistedOnDomain(const std::wstring& url, const std::vector< std::string>& frameHierarchy = std::vector<std::string>());
57 57
58 bool Matches(const std::wstring& url, const std::wstring& contentType, const s td::wstring& domain); 58 bool Matches(const std::wstring& url, const std::wstring& contentType, const s td::wstring& domain);
59 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain ); 59 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain );
60 std::vector<SubscriptionDescription> FetchAvailableSubscriptions(); 60 std::vector<SubscriptionDescription> FetchAvailableSubscriptions();
61 std::vector<SubscriptionDescription> GetListedSubscriptions(); 61 std::vector<SubscriptionDescription> GetListedSubscriptions();
62 bool IsAcceptableAdsEnabled(); 62 bool IsAcceptableAdsEnabled();
63 void SetSubscription(const std::wstring& url); 63 void SetSubscription(const std::wstring& url);
64 void AddSubscription(const std::wstring& url); 64 void AddSubscription(const std::wstring& url);
65 void RemoveSubscription(const std::wstring& url); 65 void RemoveSubscription(const std::wstring& url);
66 void UpdateAllSubscriptions(); 66 void UpdateAllSubscriptions();
(...skipping 11 matching lines...) Expand all
78 std::wstring GetAppLocale(); 78 std::wstring GetAppLocale();
79 std::wstring GetDocumentationLink(); 79 std::wstring GetDocumentationLink();
80 bool TogglePluginEnabled(); 80 bool TogglePluginEnabled();
81 std::wstring GetHostFromUrl(const std::wstring& url); 81 std::wstring GetHostFromUrl(const std::wstring& url);
82 int CompareVersions(const std::wstring& v1, const std::wstring& v2); 82 int CompareVersions(const std::wstring& v1, const std::wstring& v2);
83 83
84 bool IsFirstRun(); 84 bool IsFirstRun();
85 }; 85 };
86 86
87 #endif // _ADBLOCK_PLUS_CLIENT_H_ 87 #endif // _ADBLOCK_PLUS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld