OLD | NEW |
1 #ifndef ADBLOCKPLUS_JS_VALUE_H | 1 #ifndef ADBLOCKPLUS_JS_VALUE_H |
2 #define ADBLOCKPLUS_JS_VALUE_H | 2 #define ADBLOCKPLUS_JS_VALUE_H |
3 | 3 |
4 #include <stdint.h> | 4 #include <stdint.h> |
5 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 #include <v8.h> | 7 #include <v8.h> |
8 #include "tr1_memory.h" | 8 #include "tr1_memory.h" |
9 | 9 |
10 // Make sure windows.h doesn't mess with our method names | |
11 #undef GetClassName | |
12 | 10 |
13 namespace AdblockPlus | 11 namespace AdblockPlus |
14 { | 12 { |
15 class JsValue; | 13 class JsValue; |
16 class JsEngine; | 14 class JsEngine; |
17 | 15 |
18 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; | 16 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; |
19 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; | 17 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; |
20 | 18 |
21 // Forward declaration to avoid including JsEngine.h | 19 // Forward declaration to avoid including JsEngine.h |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 protected: | 58 protected: |
61 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); | 59 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
62 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); | 60 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
63 | 61 |
64 JsEnginePtr jsEngine; | 62 JsEnginePtr jsEngine; |
65 v8::Persistent<v8::Value> value; | 63 v8::Persistent<v8::Value> value; |
66 }; | 64 }; |
67 } | 65 } |
68 | 66 |
69 #endif | 67 #endif |
OLD | NEW |