OLD | NEW |
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-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 19 matching lines...) Expand all Loading... |
30 template<class T> class Handle; | 30 template<class T> class Handle; |
31 } | 31 } |
32 | 32 |
33 namespace AdblockPlus | 33 namespace AdblockPlus |
34 { | 34 { |
35 class JsValue; | 35 class JsValue; |
36 class JsEngine; | 36 class JsEngine; |
37 | 37 |
38 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; | 38 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; |
39 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; | 39 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; |
40 | |
41 // Forward declaration to avoid including JsEngine.h | |
42 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr; | 40 typedef std::tr1::shared_ptr<JsEngine> JsEnginePtr; |
43 | 41 |
44 class JsValue | 42 class JsValue |
45 { | 43 { |
46 friend class JsEngine; | 44 friend class JsEngine; |
47 public: | 45 public: |
48 JsValue(JsValuePtr value); | 46 JsValue(JsValuePtr value); |
49 virtual ~JsValue(); | 47 virtual ~JsValue(); |
50 | 48 |
51 bool IsUndefined() const; | 49 bool IsUndefined() const; |
(...skipping 28 matching lines...) Expand all Loading... |
80 protected: | 78 protected: |
81 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); | 79 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
82 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); | 80 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
83 | 81 |
84 JsEnginePtr jsEngine; | 82 JsEnginePtr jsEngine; |
85 V8ValueHolder<v8::Value> value; | 83 V8ValueHolder<v8::Value> value; |
86 }; | 84 }; |
87 } | 85 } |
88 | 86 |
89 #endif | 87 #endif |
OLD | NEW |