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-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 30 matching lines...) Expand all Loading... |
41 * Shared smart pointer to a `JsValue` instance. | 41 * Shared smart pointer to a `JsValue` instance. |
42 */ | 42 */ |
43 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; | 43 typedef std::tr1::shared_ptr<JsValue> JsValuePtr; |
44 | 44 |
45 /** | 45 /** |
46 * List of JavaScript values. | 46 * List of JavaScript values. |
47 */ | 47 */ |
48 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; | 48 typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; |
49 | 49 |
50 /** | 50 /** |
51 * Wrapper for JavaScript objects. | 51 * Wrapper for JavaScript values. |
52 * See `JsEngine` for creating `JsValue` objects. | 52 * See `JsEngine` for creating `JsValue` objects. |
53 */ | 53 */ |
54 class JsValue | 54 class JsValue |
55 { | 55 { |
56 friend class JsEngine; | 56 friend class JsEngine; |
57 public: | 57 public: |
58 JsValue(JsValuePtr value); | 58 JsValue(JsValuePtr value); |
59 virtual ~JsValue(); | 59 virtual ~JsValue(); |
60 | 60 |
61 bool IsUndefined() const; | 61 bool IsUndefined() const; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 protected: | 126 protected: |
127 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); | 127 JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
128 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); | 128 void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
129 | 129 |
130 JsEnginePtr jsEngine; | 130 JsEnginePtr jsEngine; |
131 V8ValueHolder<v8::Value> value; | 131 V8ValueHolder<v8::Value> value; |
132 }; | 132 }; |
133 } | 133 } |
134 | 134 |
135 #endif | 135 #endif |
LEFT | RIGHT |