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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 */ | 139 */ |
140 void TriggerEvent(const std::string& eventName, const JsValueList& params); | 140 void TriggerEvent(const std::string& eventName, const JsValueList& params); |
141 | 141 |
142 /** | 142 /** |
143 * Evaluates a JavaScript expression. | 143 * Evaluates a JavaScript expression. |
144 * @param source JavaScript expression to evaluate. | 144 * @param source JavaScript expression to evaluate. |
145 * @param filename Optional file name for the expression, used in error | 145 * @param filename Optional file name for the expression, used in error |
146 * messages. | 146 * messages. |
147 * @return Result of the evaluated expression. | 147 * @return Result of the evaluated expression. |
148 */ | 148 */ |
149 JsValuePtr Evaluate(const std::string& source, | 149 JsValue Evaluate(const std::string& source, |
150 const std::string& filename = ""); | 150 const std::string& filename = ""); |
151 | 151 |
152 /** | 152 /** |
153 * Initiates a garbage collection. | 153 * Initiates a garbage collection. |
154 */ | 154 */ |
155 void Gc(); | 155 void Gc(); |
156 | 156 |
157 //@{ | 157 //@{ |
158 /** | 158 /** |
159 * Creates a new JavaScript value. | 159 * Creates a new JavaScript value. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 EventMap eventCallbacks; | 311 EventMap eventCallbacks; |
312 std::mutex eventCallbacksMutex; | 312 std::mutex eventCallbacksMutex; |
313 mutable std::mutex isConnectionAllowedMutex; | 313 mutable std::mutex isConnectionAllowedMutex; |
314 IsConnectionAllowedCallback isConnectionAllowed; | 314 IsConnectionAllowedCallback isConnectionAllowed; |
315 TimerTasks timerTasks; | 315 TimerTasks timerTasks; |
316 TimerPtr timer; | 316 TimerPtr timer; |
317 }; | 317 }; |
318 } | 318 } |
319 | 319 |
320 #endif | 320 #endif |
OLD | NEW |