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

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

Issue 5653480979038208: Issue 2325 - Add a way to set settings in libadblockplus for FRP and automatic updates (Closed)
Patch Set: Added a unit test. Changed the global object injection routine. Created June 10, 2015, 8:42 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
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-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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 /** 205 /**
206 * Sets the `LogSystem` implementation used for logging (e.g. to handle 206 * Sets the `LogSystem` implementation used for logging (e.g. to handle
207 * `console.log()` calls from JavaScript). 207 * `console.log()` calls from JavaScript).
208 * Setting this is optional, the engine will use a `DefaultLogSystem` 208 * Setting this is optional, the engine will use a `DefaultLogSystem`
209 * instance by default, which might be sufficient. 209 * instance by default, which might be sufficient.
210 * @param The `LogSystem` instance to use. 210 * @param The `LogSystem` instance to use.
211 */ 211 */
212 void SetLogSystem(LogSystemPtr val); 212 void SetLogSystem(LogSystemPtr val);
213 213
214 /**
215 * Gets the global Javascript object, which contains objects that can be
216 * accessed by all the scripts.
217 * @param The `JsValuePtr` to use
Eric 2015/06/10 17:48:16 @param is for the following function, not this one
218 */
219 JsValuePtr GetGlobalJsObject();
220
221 /**
222 * See GetGlobalJsObject()
223 */
224 void SetGlobalJsObject(JsValuePtr globalJsObject);
Eric 2015/06/10 17:48:16 SetGlobalJsObject() is never called. It probably
214 private: 225 private:
215 JsEngine(); 226 JsEngine();
216 227
217 FileSystemPtr fileSystem; 228 FileSystemPtr fileSystem;
218 WebRequestPtr webRequest; 229 WebRequestPtr webRequest;
219 LogSystemPtr logSystem; 230 LogSystemPtr logSystem;
220 v8::Isolate* isolate; 231 v8::Isolate* isolate;
221 V8ValueHolder<v8::Context> context; 232 V8ValueHolder<v8::Context> context;
222 EventMap eventCallbacks; 233 EventMap eventCallbacks;
234 JsValuePtr globalJsObject;
223 }; 235 };
224 } 236 }
225 237
226 #endif 238 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld