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

Side by Side Diff: include/AdblockPlus/JsEngine.h

Issue 29497591: Issue 5180 - remove synchronous WebRequest interface and stop exposing of DefaultWebRequest (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 25, 2017, 2:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/AdblockPlus/DefaultWebRequest.h ('k') | include/AdblockPlus/WebRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 #include <map> 22 #include <map>
23 #include <list> 23 #include <list>
24 #include <stdexcept> 24 #include <stdexcept>
25 #include <stdint.h> 25 #include <stdint.h>
26 #include <string> 26 #include <string>
27 #include <mutex> 27 #include <mutex>
28 #include <AdblockPlus/AppInfo.h> 28 #include <AdblockPlus/AppInfo.h>
29 #include <AdblockPlus/LogSystem.h> 29 #include <AdblockPlus/LogSystem.h>
30 #include <AdblockPlus/FileSystem.h> 30 #include <AdblockPlus/FileSystem.h>
31 #include <AdblockPlus/JsValue.h> 31 #include <AdblockPlus/JsValue.h>
32 #include <AdblockPlus/WebRequest.h> 32 #include <AdblockPlus/IWebRequest.h>
33 #include <AdblockPlus/ITimer.h> 33 #include <AdblockPlus/ITimer.h>
34 34
35 namespace v8 35 namespace v8
36 { 36 {
37 class Isolate; 37 class Isolate;
38 class Value; 38 class Value;
39 class Context; 39 class Context;
40 template<typename T> class FunctionCallbackInfo; 40 template<typename T> class FunctionCallbackInfo;
41 typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>& info); 41 typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>& info);
42 } 42 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 /** 270 /**
271 * Sets the synchronous `FileSystem` implementation used for all 271 * Sets the synchronous `FileSystem` implementation used for all
272 * file I/O. Setting this is optional, the engine will use the 272 * file I/O. Setting this is optional, the engine will use the
273 * implementation created by `CreateDefaultFileSystem()` by 273 * implementation created by `CreateDefaultFileSystem()` by
274 * default, which might be sufficient. 274 * default, which might be sufficient.
275 * @param The `FileSystem` instance to use. 275 * @param The `FileSystem` instance to use.
276 */ 276 */
277 void SetFileSystem(const FileSystemSyncPtr& val); 277 void SetFileSystem(const FileSystemSyncPtr& val);
278 278
279 /** 279 /**
280 * Sets the `WebRequest` implementation used for XMLHttpRequests.
281 * Setting this is optional, the engine will use a `DefaultWebRequest`
282 * instance by default, which might be sufficient.
283 * @param The `WebRequest` instance to use.
284 */
285 void SetWebRequest(const WebRequestSharedPtr& val);
286
287 /**
288 * @see `SetLogSystem()`. 280 * @see `SetLogSystem()`.
289 */ 281 */
290 LogSystemPtr GetLogSystem() const; 282 LogSystemPtr GetLogSystem() const;
291 283
292 /** 284 /**
293 * Sets the `LogSystem` implementation used for logging (e.g. to handle 285 * Sets the `LogSystem` implementation used for logging (e.g. to handle
294 * `console.log()` calls from JavaScript). 286 * `console.log()` calls from JavaScript).
295 * Setting this is optional, the engine will use a `DefaultLogSystem` 287 * Setting this is optional, the engine will use a `DefaultLogSystem`
296 * instance by default, which might be sufficient. 288 * instance by default, which might be sufficient.
297 * @param The `LogSystem` instance to use. 289 * @param The `LogSystem` instance to use.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 323
332 FileSystemPtr fileSystem; 324 FileSystemPtr fileSystem;
333 LogSystemPtr logSystem; 325 LogSystemPtr logSystem;
334 std::unique_ptr<v8::Global<v8::Context>> context; 326 std::unique_ptr<v8::Global<v8::Context>> context;
335 EventMap eventCallbacks; 327 EventMap eventCallbacks;
336 std::mutex eventCallbacksMutex; 328 std::mutex eventCallbacksMutex;
337 JsWeakValuesLists jsWeakValuesLists; 329 JsWeakValuesLists jsWeakValuesLists;
338 std::mutex jsWeakValuesListsMutex; 330 std::mutex jsWeakValuesListsMutex;
339 TimerPtr timer; 331 TimerPtr timer;
340 WebRequestPtr webRequest; 332 WebRequestPtr webRequest;
341 WebRequestSharedPtr webRequestLegacy;
342 }; 333 };
343 } 334 }
344 335
345 #endif 336 #endif
OLDNEW
« no previous file with comments | « include/AdblockPlus/DefaultWebRequest.h ('k') | include/AdblockPlus/WebRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld