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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 /** | 179 /** |
180 * Callback type invoked when the filters change. | 180 * Callback type invoked when the filters change. |
181 * The first parameter is the action event code (see | 181 * The first parameter is the action event code (see |
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. Allows disabling FRP and auto updates |
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 disableAutoUpdates `bool` true if automatic updates should | |
193 * be disabled | |
194 * @param disableFRP `bool` true if first run page should be disabled | |
192 */ | 195 */ |
193 explicit FilterEngine(JsEnginePtr jsEngine); | 196 explicit FilterEngine(JsEnginePtr jsEngine, bool firstRunDisabled = false, b ool autoUpdatesDisabled = false); |
Eric
2015/05/15 19:36:13
Even at this early stage, I think it would be bett
Felix Dahlke
2015/05/28 20:42:56
I agree - in fact, I had something more generic in
| |
194 | 197 |
195 /** | 198 /** |
196 * Retrieves the `JsEngine` instance associated with this `FilterEngine` | 199 * Retrieves the `JsEngine` instance associated with this `FilterEngine` |
197 * instance. | 200 * instance. |
198 */ | 201 */ |
199 JsEnginePtr GetJsEngine() const { return jsEngine; } | 202 JsEnginePtr GetJsEngine() const { return jsEngine; } |
200 | 203 |
201 /** | 204 /** |
202 * Checks if this is the first run of the application. | 205 * Checks if this is the first run of the application. |
203 * @return `true` if the application is running for the first time. | 206 * @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, | 386 ContentType contentType, |
384 const std::string& documentUrl) const; | 387 const std::string& documentUrl) const; |
385 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); | 388 void UpdateAvailable(UpdateAvailableCallback callback, JsValueList& params); |
386 void UpdateCheckDone(const std::string& eventName, | 389 void UpdateCheckDone(const std::string& eventName, |
387 UpdateCheckDoneCallback callback, JsValueList& params); | 390 UpdateCheckDoneCallback callback, JsValueList& params); |
388 void FilterChanged(FilterChangeCallback callback, JsValueList& params); | 391 void FilterChanged(FilterChangeCallback callback, JsValueList& params); |
389 }; | 392 }; |
390 } | 393 } |
391 | 394 |
392 #endif | 395 #endif |
OLD | NEW |