| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 12 matching lines...) Expand all Loading... |
| 23 #include <stdint.h> | 23 #include <stdint.h> |
| 24 #include <string> | 24 #include <string> |
| 25 #include <AdblockPlus/AppInfo.h> | 25 #include <AdblockPlus/AppInfo.h> |
| 26 #include <AdblockPlus/tr1_functional.h> | 26 #include <AdblockPlus/tr1_functional.h> |
| 27 #include <AdblockPlus/LogSystem.h> | 27 #include <AdblockPlus/LogSystem.h> |
| 28 #include <AdblockPlus/FileSystem.h> | 28 #include <AdblockPlus/FileSystem.h> |
| 29 #include <AdblockPlus/JsValue.h> | 29 #include <AdblockPlus/JsValue.h> |
| 30 #include <AdblockPlus/WebRequest.h> | 30 #include <AdblockPlus/WebRequest.h> |
| 31 | 31 |
| 32 #include "tr1_memory.h" | 32 #include "tr1_memory.h" |
| 33 #include "V8ValueHolder.h" |
| 33 | 34 |
| 34 namespace v8 | 35 namespace v8 |
| 35 { | 36 { |
| 36 class Arguments; | 37 class Arguments; |
| 37 class Isolate; | 38 class Isolate; |
| 38 class Context; | 39 class Context; |
| 39 template <class T> class Handle; | 40 template <class T> class Handle; |
| 40 template <class T> class Persistent; | 41 template <class T> class Persistent; |
| 41 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); | 42 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); |
| 42 } | 43 } |
| 43 | 44 |
| 44 namespace AdblockPlus | 45 namespace AdblockPlus |
| 45 { | 46 { |
| 46 class JsEngine; | 47 class JsEngine; |
| 47 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr; | 48 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr; |
| 48 | 49 |
| 49 class JsEngine : public std::tr1::enable_shared_from_this<JsEngine> | 50 class JsEngine : public std::tr1::enable_shared_from_this<JsEngine> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 LogSystemPtr GetLogSystem(); | 92 LogSystemPtr GetLogSystem(); |
| 92 void SetLogSystem(LogSystemPtr val); | 93 void SetLogSystem(LogSystemPtr val); |
| 93 | 94 |
| 94 private: | 95 private: |
| 95 JsEngine(); | 96 JsEngine(); |
| 96 | 97 |
| 97 FileSystemPtr fileSystem; | 98 FileSystemPtr fileSystem; |
| 98 WebRequestPtr webRequest; | 99 WebRequestPtr webRequest; |
| 99 LogSystemPtr logSystem; | 100 LogSystemPtr logSystem; |
| 100 v8::Isolate* isolate; | 101 v8::Isolate* isolate; |
| 101 std::auto_ptr<v8::Persistent<v8::Context> > context; | 102 V8ValueHolder<v8::Context> context; |
| 102 EventMap eventCallbacks; | 103 EventMap eventCallbacks; |
| 103 }; | 104 }; |
| 104 } | 105 } |
| 105 | 106 |
| 106 #endif | 107 #endif |
| LEFT | RIGHT |