| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef _JS_VALUE_H_ | 7 #ifndef _JS_VALUE_H_ |
| 8 #define _JS_VALUE_H_ | 8 #define _JS_VALUE_H_ |
| 9 | 9 |
| 10 class CJS_Array; | 10 class CJS_Array; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 FX_BOOL ConvertToArray(CJS_Array &) const; | 66 FX_BOOL ConvertToArray(CJS_Array &) const; |
| 67 FX_BOOL ConvertToDate(CJS_Date &) const; | 67 FX_BOOL ConvertToDate(CJS_Date &) const; |
| 68 | 68 |
| 69 v8::Isolate* GetIsolate() {return m_isolate;} | 69 v8::Isolate* GetIsolate() {return m_isolate;} |
| 70 protected: | 70 protected: |
| 71 v8::Handle<v8::Value> m_pValue; | 71 v8::Handle<v8::Value> m_pValue; |
| 72 FXJSVALUETYPE m_eType; | 72 FXJSVALUETYPE m_eType; |
| 73 v8::Isolate* m_isolate; | 73 v8::Isolate* m_isolate; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 template<class TYPE> class CJS_ParametersTmpl : public CFX_ArrayTemplate<TYPE> | 76 class CJS_Parameters : public CFX_ArrayTemplate<CJS_Value> |
| 77 { | 77 { |
| 78 public: | 78 public: |
| 79 » void push_back(TYPE newElement){CFX_ArrayTemplate<TYPE>::Add(newElement)
;} | 79 » void push_back(const CJS_Value& newElement) { |
| 80 » int size() const{return CFX_ArrayTemplate<TYPE>::GetSize();} | 80 » » CFX_ArrayTemplate<CJS_Value>::Add(newElement); |
| 81 » } |
| 82 » int size() const { |
| 83 » » return CFX_ArrayTemplate<CJS_Value>::GetSize(); |
| 84 » } |
| 81 }; | 85 }; |
| 82 typedef CJS_ParametersTmpl<CJS_Value> CJS_Parameters; | |
| 83 | 86 |
| 84 class CJS_PropValue: public CJS_Value | 87 class CJS_PropValue: public CJS_Value |
| 85 { | 88 { |
| 86 public: | 89 public: |
| 87 CJS_PropValue(const CJS_Value &); | 90 CJS_PropValue(const CJS_Value &); |
| 88 CJS_PropValue(v8::Isolate* isolate); | 91 CJS_PropValue(v8::Isolate* isolate); |
| 89 ~CJS_PropValue(); | 92 ~CJS_PropValue(); |
| 90 public: | 93 public: |
| 91 FX_BOOL IsSetting(); | 94 FX_BOOL IsSetting(); |
| 92 FX_BOOL IsGetting(); | 95 FX_BOOL IsGetting(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 180 |
| 178 FX_BOOL IsValidDate(); | 181 FX_BOOL IsValidDate(); |
| 179 | 182 |
| 180 protected: | 183 protected: |
| 181 v8::Handle<v8::Value> m_pDate; | 184 v8::Handle<v8::Value> m_pDate; |
| 182 v8::Isolate* m_isolate; | 185 v8::Isolate* m_isolate; |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 #endif //_JS_VALUE_H_ | 188 #endif //_JS_VALUE_H_ |
| 186 | 189 |
| OLD | NEW |