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

Side by Side Diff: include/AdblockPlus/FilterEngine.h

Issue 23127017: Consider the frame structure in Matches() (Closed)
Patch Set: Proper exception rule handling Created Nov. 3, 2013, 3:46 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/FilterEngine.cpp » ('j') | src/FilterEngine.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 JsEnginePtr GetJsEngine() const { return jsEngine; } 75 JsEnginePtr GetJsEngine() const { return jsEngine; }
76 bool IsFirstRun() const; 76 bool IsFirstRun() const;
77 FilterPtr GetFilter(const std::string& text); 77 FilterPtr GetFilter(const std::string& text);
78 SubscriptionPtr GetSubscription(const std::string& url); 78 SubscriptionPtr GetSubscription(const std::string& url);
79 std::vector<FilterPtr> GetListedFilters() const; 79 std::vector<FilterPtr> GetListedFilters() const;
80 std::vector<SubscriptionPtr> GetListedSubscriptions() const; 80 std::vector<SubscriptionPtr> GetListedSubscriptions() const;
81 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const; 81 std::vector<SubscriptionPtr> FetchAvailableSubscriptions() const;
82 FilterPtr Matches(const std::string& url, 82 FilterPtr Matches(const std::string& url,
83 const std::string& contentType, 83 const std::string& contentType,
84 const std::string& documentUrl) const; 84 const std::string& documentUrl) const;
85 FilterPtr Matches(const std::string& url,
86 const std::string& contentType,
87 const std::vector<std::string>& documentUrls) const;
85 std::vector<std::string> GetElementHidingSelectors(const std::string& domain ) const; 88 std::vector<std::string> GetElementHidingSelectors(const std::string& domain ) const;
86 JsValuePtr GetPref(const std::string& pref) const; 89 JsValuePtr GetPref(const std::string& pref) const;
87 void SetPref(const std::string& pref, JsValuePtr value); 90 void SetPref(const std::string& pref, JsValuePtr value);
88 void ForceUpdateCheck(UpdaterCallback callback = 0); 91 void ForceUpdateCheck(UpdaterCallback callback = 0);
89 void SetFilterChangeCallback(FilterChangeCallback callback); 92 void SetFilterChangeCallback(FilterChangeCallback callback);
90 void RemoveFilterChangeCallback(); 93 void RemoveFilterChangeCallback();
91 94
92 private: 95 private:
93 JsEnginePtr jsEngine; 96 JsEnginePtr jsEngine;
94 bool initialized; 97 bool initialized;
95 bool firstRun; 98 bool firstRun;
96 int updateCheckId; 99 int updateCheckId;
97 100
98 void InitDone(JsValueList& params); 101 void InitDone(JsValueList& params);
102 FilterPtr CheckFilterMatch(const std::string& url,
103 const std::string& contentType,
104 const std::string& documentUrl) const;
99 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params); 105 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params);
100 void FilterChanged(FilterChangeCallback callback, JsValueList& params); 106 void FilterChanged(FilterChangeCallback callback, JsValueList& params);
101 }; 107 };
102 } 108 }
103 109
104 #endif 110 #endif
OLDNEW
« no previous file with comments | « no previous file | src/FilterEngine.cpp » ('j') | src/FilterEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld