Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 | 89 |
90 /** | 90 /** |
91 * Maps events to callback functions. | 91 * Maps events to callback functions. |
92 */ | 92 */ |
93 typedef std::map<std::string, EventCallback> EventMap; | 93 typedef std::map<std::string, EventCallback> EventMap; |
94 | 94 |
95 /** | 95 /** |
96 * Creates a new JavaScript engine instance. | 96 * Creates a new JavaScript engine instance. |
97 * @param appInfo Information about the app. | 97 * @param appInfo Information about the app. |
98 * @param isolate v8::Isolate wrapper. This parameter should be considered | 98 * @param isolate v8::Isolate wrapper. This parameter should be considered |
99 * as a temporay hack for tests, it will go away. Issue #3593. | 99 * as a temporary hack for tests, it will go away. Issue #3593. |
Eric
2016/01/28 16:42:42
spelling "temporary"
sergei
2016/01/29 11:31:15
Done.
| |
100 * @return New `JsEngine` instance. | 100 * @return New `JsEngine` instance. |
101 */ | 101 */ |
102 static JsEnginePtr New(const AppInfo& appInfo = AppInfo(), const ScopedV8Iso latePtr& isolate = ScopedV8IsolatePtr(new ScopedV8Isolate())); | 102 static JsEnginePtr New(const AppInfo& appInfo = AppInfo(), const ScopedV8Iso latePtr& isolate = ScopedV8IsolatePtr(new ScopedV8Isolate())); |
103 | 103 |
104 /** | 104 /** |
105 * Registers the callback function for an event. | 105 * Registers the callback function for an event. |
106 * @param eventName Event name. Note that this can be any string - it's a | 106 * @param eventName Event name. Note that this can be any string - it's a |
107 * general purpose event handling mechanism. | 107 * general purpose event handling mechanism. |
108 * @param callback Event callback function. | 108 * @param callback Event callback function. |
109 */ | 109 */ |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 FileSystemPtr fileSystem; | 260 FileSystemPtr fileSystem; |
261 WebRequestPtr webRequest; | 261 WebRequestPtr webRequest; |
262 LogSystemPtr logSystem; | 262 LogSystemPtr logSystem; |
263 std::unique_ptr<v8::Persistent<v8::Context>> context; | 263 std::unique_ptr<v8::Persistent<v8::Context>> context; |
264 EventMap eventCallbacks; | 264 EventMap eventCallbacks; |
265 JsValuePtr globalJsObject; | 265 JsValuePtr globalJsObject; |
266 }; | 266 }; |
267 } | 267 } |
268 | 268 |
269 #endif | 269 #endif |
LEFT | RIGHT |