Left: | ||
Right: |
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 * [FilterNotifier.triggerListeners](https://adblockplus.org/jsdoc/adblockpl us/symbols/FilterNotifier.html#.triggerListeners) | 182 * [FilterNotifier.triggerListeners](https://adblockplus.org/jsdoc/adblockpl us/symbols/FilterNotifier.html#.triggerListeners) |
183 * for the full list). | 183 * for the full list). |
184 * The second parameter is the filter/subscription object affected, if any. | 184 * The second parameter is the filter/subscription object affected, if any. |
185 */ | 185 */ |
186 typedef std::tr1::function<void(const std::string&, const JsValuePtr)> Filte rChangeCallback; | 186 typedef std::tr1::function<void(const std::string&, const JsValuePtr)> Filte rChangeCallback; |
187 | 187 |
188 /** | 188 /** |
189 * Constructor. | 189 * Constructor. |
190 * @param jsEngine `JsEngine` instance used to run JavaScript code | 190 * @param jsEngine `JsEngine` instance used to run JavaScript code |
191 * internally. | 191 * internally. |
192 * @param preconfiguredPrefs `std::map<std::string,AdblockPlus::JsValuePtr>` | |
193 * name-value list of preconfigured prefs. | |
192 */ | 194 */ |
193 explicit FilterEngine(JsEnginePtr jsEngine); | 195 explicit FilterEngine(JsEnginePtr jsEngine, |
196 std::map<std::string, AdblockPlus::JsValuePtr> preconfiguredPrefs = | |
197 std::map<std::string, AdblockPlus::JsValuePtr>() | |
Eric
2015/06/10 17:48:16
It would be useful to add a class-member typedef f
Oleksandr
2015/06/12 10:47:57
Done.
| |
198 ); | |
194 | 199 |
195 /** | 200 /** |
196 * Retrieves the `JsEngine` instance associated with this `FilterEngine` | 201 * Retrieves the `JsEngine` instance associated with this `FilterEngine` |
197 * instance. | 202 * instance. |
198 */ | 203 */ |
199 JsEnginePtr GetJsEngine() const { return jsEngine; } | 204 JsEnginePtr GetJsEngine() const { return jsEngine; } |
200 | 205 |
201 /** | 206 /** |
202 * Checks if this is the first run of the application. | 207 * Checks if this is the first run of the application. |
203 * @return `true` if the application is running for the first time. | 208 * @return `true` if the application is running for the first time. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 ContentType contentType, | 388 ContentType contentType, |
384 const std::string& documentUrl) const; | 389 const std::string& documentUrl) const; |
385 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); | 390 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); |
386 void UpdateCheckDone(const std::string& eventName, | 391 void UpdateCheckDone(const std::string& eventName, |
387 UpdateCheckDoneCallback callback, JsValueList& params); | 392 UpdateCheckDoneCallback callback, JsValueList& params); |
388 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 393 void FilterChanged(FilterChangeCallback callback, JsValueList& params); |
389 }; | 394 }; |
390 } | 395 } |
391 | 396 |
392 #endif | 397 #endif |
OLD | NEW |