| OLD | NEW |
| 1 #ifndef _SIMPLE_ADBLOCK_CLIENT_H_ | 1 #ifndef _SIMPLE_ADBLOCK_CLIENT_H_ |
| 2 #define _SIMPLE_ADBLOCK_CLIENT_H_ | 2 #define _SIMPLE_ADBLOCK_CLIENT_H_ |
| 3 | 3 |
| 4 | 4 |
| 5 #include "PluginTypedef.h" | 5 #include "PluginTypedef.h" |
| 6 #include "PluginClientBase.h" | 6 #include "PluginClientBase.h" |
| 7 #include "AdblockPlus.h" | 7 #include "AdblockPlus.h" |
| 8 | 8 |
| 9 | 9 |
| 10 using namespace AdblockPlus; | 10 using namespace AdblockPlus; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 CAdblockPlusClient(); | 29 CAdblockPlusClient(); |
| 30 | 30 |
| 31 public: | 31 public: |
| 32 | 32 |
| 33 static CAdblockPlusClient* s_instance; | 33 static CAdblockPlusClient* s_instance; |
| 34 | 34 |
| 35 ~CAdblockPlusClient(); | 35 ~CAdblockPlusClient(); |
| 36 | 36 |
| 37 static CAdblockPlusClient* GetInstance(); | 37 static CAdblockPlusClient* GetInstance(); |
| 38 | 38 |
| 39 AdblockPlus::FilterEngine* GetFilterEngine(); | |
| 40 | |
| 41 // Removes the url from the list of whitelisted urls if present | 39 // Removes the url from the list of whitelisted urls if present |
| 42 // Only called from ui thread | 40 // Only called from ui thread |
| 43 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add
Debug=false); | 41 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add
Debug=false); |
| 44 | 42 |
| 45 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom
ain, const CString& indent, CPluginFilter* filter); | 43 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom
ain, const CString& indent, CPluginFilter* filter); |
| 46 bool IsUrlWhiteListed(const CString& url); | 44 bool IsUrlWhiteListed(const CString& url); |
| 47 | 45 |
| 48 int GetIEVersion(); | 46 int GetIEVersion(); |
| 49 | 47 |
| 48 bool Matches(const std::string& url, const std::string& contentType, const std
::string& domain); |
| 49 std::vector<std::string> GetElementHidingSelectors(std::string domain); |
| 50 std::vector<AdblockPlus::SubscriptionPtr> FetchAvailableSubscriptions(); |
| 51 std::vector<AdblockPlus::FilterPtr> GetListedFilters(); |
| 52 AdblockPlus::FilterPtr GetFilter(std::string text); |
| 53 std::vector<AdblockPlus::SubscriptionPtr> GetListedSubscriptions(); |
| 54 AdblockPlus::SubscriptionPtr GetSubscription(std::string url); |
| 50 }; | 55 }; |
| 51 | 56 |
| 52 #endif // _SIMPLE_ADBLOCK_CLIENT_H_ | 57 #endif // _SIMPLE_ADBLOCK_CLIENT_H_ |
| OLD | NEW |