OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 static CAdblockPlusClient* s_instance; | 58 static CAdblockPlusClient* s_instance; |
59 | 59 |
60 ~CAdblockPlusClient(); | 60 ~CAdblockPlusClient(); |
61 | 61 |
62 static CAdblockPlusClient* GetInstance(); | 62 static CAdblockPlusClient* GetInstance(); |
63 | 63 |
64 // Removes the url from the list of whitelisted urls if present | 64 // Removes the url from the list of whitelisted urls if present |
65 // Only called from ui thread | 65 // Only called from ui thread |
66 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy
pe contentType, const std::wstring& domain, bool addDebug=false); | 66 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy
pe contentType, const std::wstring& domain, bool addDebug=false); |
67 | 67 |
68 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws
tring& domain, const std::wstring& indent, CPluginFilter* filter); | |
69 bool IsWhitelistedUrl(const std::wstring& url, const std::vector<std::string>&
frameHierarchy = std::vector<std::string>()); | 68 bool IsWhitelistedUrl(const std::wstring& url, const std::vector<std::string>&
frameHierarchy = std::vector<std::string>()); |
70 std::string GetWhitelistingFilter(const std::wstring& url, const std::vector<s
td::string>& frameHierarchy = std::vector<std::string>()); | 69 std::string GetWhitelistingFilter(const std::wstring& url, const std::vector<s
td::string>& frameHierarchy = std::vector<std::string>()); |
71 bool IsElemhideWhitelistedOnDomain(const std::wstring& url, const std::vector<
std::string>& frameHierarchy = std::vector<std::string>()); | 70 bool IsElemhideWhitelistedOnDomain(const std::wstring& url, const std::vector<
std::string>& frameHierarchy = std::vector<std::string>()); |
72 | 71 |
73 bool Matches(const std::wstring& url, AdblockPlus::FilterEngine::ContentType c
ontentType, const std::wstring& domain); | 72 bool Matches(const std::wstring& url, AdblockPlus::FilterEngine::ContentType c
ontentType, const std::wstring& domain); |
74 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain
); | 73 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain
); |
75 std::vector<SubscriptionDescription> FetchAvailableSubscriptions(); | 74 std::vector<SubscriptionDescription> FetchAvailableSubscriptions(); |
76 std::vector<SubscriptionDescription> GetListedSubscriptions(); | 75 std::vector<SubscriptionDescription> GetListedSubscriptions(); |
77 bool IsAcceptableAdsEnabled(); | 76 bool IsAcceptableAdsEnabled(); |
78 void SetSubscription(const std::wstring& url); | 77 void SetSubscription(const std::wstring& url); |
(...skipping 16 matching lines...) Expand all Loading... |
95 bool TogglePluginEnabled(); | 94 bool TogglePluginEnabled(); |
96 std::wstring GetHostFromUrl(const std::wstring& url); | 95 std::wstring GetHostFromUrl(const std::wstring& url); |
97 int CompareVersions(const std::wstring& v1, const std::wstring& v2); | 96 int CompareVersions(const std::wstring& v1, const std::wstring& v2); |
98 | 97 |
99 bool IsFirstRun(); | 98 bool IsFirstRun(); |
100 }; | 99 }; |
101 | 100 |
102 typedef CAdblockPlusClient CPluginClient; | 101 typedef CAdblockPlusClient CPluginClient; |
103 | 102 |
104 #endif // _ADBLOCK_PLUS_CLIENT_H_ | 103 #endif // _ADBLOCK_PLUS_CLIENT_H_ |
OLD | NEW |