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: Make sure a pref is stored if it was modified. Add test. Address nits. Created June 12, 2015, 10:45 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 * Sets a global property that can be accessed by all the scripts.
216 * @param The `std::string` name of the property to set
217 * @param The `JsValuePtr` value the property to set
Felix Dahlke 2015/06/12 11:55:35 "value of"? :)
Oleksandr 2015/06/12 12:29:59 Done.
218 */
219 void SetGlobalProperty(std::string name, AdblockPlus::JsValuePtr value);
220
214 private: 221 private:
215 JsEngine(); 222 JsEngine();
216 223
217 FileSystemPtr fileSystem; 224 FileSystemPtr fileSystem;
218 WebRequestPtr webRequest; 225 WebRequestPtr webRequest;
219 LogSystemPtr logSystem; 226 LogSystemPtr logSystem;
220 v8::Isolate* isolate; 227 v8::Isolate* isolate;
221 V8ValueHolder<v8::Context> context; 228 V8ValueHolder<v8::Context> context;
222 EventMap eventCallbacks; 229 EventMap eventCallbacks;
230 JsValuePtr globalJsObject;
223 }; 231 };
224 } 232 }
225 233
226 #endif 234 #endif
OLDNEW
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | lib/prefs.js » ('j') | lib/prefs.js » ('J')

Powered by Google App Engine
This is Rietveld