| Index: include/AdblockPlus/JsEngine.h |
| =================================================================== |
| --- a/include/AdblockPlus/JsEngine.h |
| +++ b/include/AdblockPlus/JsEngine.h |
| @@ -37,29 +37,47 @@ namespace AdblockPlus |
| inline JsValuePtr NewValue(const char* val) |
| { |
| return NewValue(std::string(val)); |
| } |
| inline JsValuePtr NewValue(int val) |
| { |
| return NewValue((int64_t)val); |
| } |
| + JsValuePtr NewObject(); |
| + static JsEngine& FromArguments(const v8::Arguments& arguments); |
| + JsValueList ConvertArguments(const v8::Arguments& arguments); |
| + |
| + inline FileSystem& GetFileSystem() |
| + { |
| + return fileSystem; |
| + } |
| + inline WebRequest& GetWebRequest() |
| + { |
| + return webRequest; |
| + } |
| + inline ErrorCallback& GetErrorCallback() |
| + { |
| + return errorCallback; |
| + } |
| class Context |
| { |
| public: |
| Context(const JsEngine& jsEngine); |
| virtual inline ~Context() {}; |
| private: |
| const v8::Locker locker; |
| const v8::HandleScope handleScope; |
| const v8::Context::Scope contextScope; |
| }; |
| private: |
| - const FileSystem* const fileSystem; |
| + FileSystem& fileSystem; |
| + WebRequest& webRequest; |
| + ErrorCallback& errorCallback; |
| v8::Isolate* isolate; |
| v8::Persistent<v8::Context> context; |
| }; |
| } |
| #endif |