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

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

Issue 29428624: Issue 5180 - stop using of WebRequestPtr in tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 3, 2017, 2:07 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 | « no previous file | 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 * Sets the `FileSystem` implementation used for all file I/O. 258 * Sets the `FileSystem` implementation used for all file I/O.
259 * Setting this is optional, the engine will use a `DefaultFileSystem` 259 * Setting this is optional, the engine will use a `DefaultFileSystem`
260 * instance by default, which might be sufficient. 260 * instance by default, which might be sufficient.
261 * @param The `FileSystem` instance to use. 261 * @param The `FileSystem` instance to use.
262 */ 262 */
263 void SetFileSystem(const FileSystemPtr& val); 263 void SetFileSystem(const FileSystemPtr& val);
264 264
265 /** 265 /**
266 * @see `SetWebRequest()`. 266 * @see `SetWebRequest()`.
267 */ 267 */
268 WebRequestPtr GetWebRequest() const; 268 WebRequestSharedPtr GetWebRequest() const;
269 269
270 /** 270 /**
271 * Sets the `WebRequest` implementation used for XMLHttpRequests. 271 * Sets the `WebRequest` implementation used for XMLHttpRequests.
272 * Setting this is optional, the engine will use a `DefaultWebRequest` 272 * Setting this is optional, the engine will use a `DefaultWebRequest`
273 * instance by default, which might be sufficient. 273 * instance by default, which might be sufficient.
274 * @param The `WebRequest` instance to use. 274 * @param The `WebRequest` instance to use.
275 */ 275 */
276 void SetWebRequest(const WebRequestPtr& val); 276 void SetWebRequest(const WebRequestSharedPtr& val);
277 277
278 /** 278 /**
279 * @see `SetLogSystem()`. 279 * @see `SetLogSystem()`.
280 */ 280 */
281 LogSystemPtr GetLogSystem() const; 281 LogSystemPtr GetLogSystem() const;
282 282
283 /** 283 /**
284 * Sets the `LogSystem` implementation used for logging (e.g. to handle 284 * Sets the `LogSystem` implementation used for logging (e.g. to handle
285 * `console.log()` calls from JavaScript). 285 * `console.log()` calls from JavaScript).
286 * Setting this is optional, the engine will use a `DefaultLogSystem` 286 * Setting this is optional, the engine will use a `DefaultLogSystem`
(...skipping 22 matching lines...) Expand all
309 309
310 explicit JsEngine(const ScopedV8IsolatePtr& isolate, TimerPtr timer); 310 explicit JsEngine(const ScopedV8IsolatePtr& isolate, TimerPtr timer);
311 311
312 JsValue GetGlobalObject(); 312 JsValue GetGlobalObject();
313 313
314 /// Isolate must be disposed only after disposing of all objects which are 314 /// Isolate must be disposed only after disposing of all objects which are
315 /// using it. 315 /// using it.
316 ScopedV8IsolatePtr isolate; 316 ScopedV8IsolatePtr isolate;
317 317
318 FileSystemPtr fileSystem; 318 FileSystemPtr fileSystem;
319 WebRequestPtr webRequest; 319 WebRequestSharedPtr webRequest;
320 LogSystemPtr logSystem; 320 LogSystemPtr logSystem;
321 std::unique_ptr<v8::Persistent<v8::Context>> context; 321 std::unique_ptr<v8::Persistent<v8::Context>> context;
322 EventMap eventCallbacks; 322 EventMap eventCallbacks;
323 std::mutex eventCallbacksMutex; 323 std::mutex eventCallbacksMutex;
324 JsWeakValuesLists jsWeakValuesLists; 324 JsWeakValuesLists jsWeakValuesLists;
325 std::mutex jsWeakValuesListsMutex; 325 std::mutex jsWeakValuesListsMutex;
326 TimerPtr timer; 326 TimerPtr timer;
327 }; 327 };
328 } 328 }
329 329
330 #endif 330 #endif
OLDNEW
« no previous file with comments | « no previous file | include/AdblockPlus/WebRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld