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

Unified Diff: include/AdblockPlus/FilterEngine.h

Issue 11018003: Filter changed callback (Closed)
Patch Set: Filter changed callback Created July 22, 2013, 9:16 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/filterUpdateRegistration.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/FilterEngine.h
===================================================================
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -69,6 +69,7 @@
{
public:
typedef std::tr1::function<void(const std::string&)> UpdaterCallback;
+ typedef std::tr1::function<void(const std::string&, const JsValuePtr)> FilterChangeCallback;
explicit FilterEngine(JsEnginePtr jsEngine);
JsEnginePtr GetJsEngine() const { return jsEngine; }
@@ -85,6 +86,8 @@
JsValuePtr GetPref(const std::string& pref) const;
void SetPref(const std::string& pref, JsValuePtr value);
void ForceUpdateCheck(UpdaterCallback callback = 0);
+ void SetFilterChangeCallback(FilterChangeCallback callback);
+ void RemoveFilterChangeCallback();
private:
JsEnginePtr jsEngine;
@@ -94,6 +97,7 @@
void InitDone(JsValueList& params);
void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params);
+ void FilterChanged(FilterChangeCallback callback, JsValueList& params);
};
}
« no previous file with comments | « no previous file | lib/filterUpdateRegistration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld