| 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 FPDFSDK_JAVASCRIPT_JS_VALUE_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_JS_VALUE_H_ |
| 8 #define FPDFSDK_JAVASCRIPT_JS_VALUE_H_ | 8 #define FPDFSDK_JAVASCRIPT_JS_VALUE_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 CJS_Value(CJS_Runtime* pRuntime, const float& fValue); | 39 CJS_Value(CJS_Runtime* pRuntime, const float& fValue); |
| 40 CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); | 40 CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); |
| 41 CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Object>); | 41 CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Object>); |
| 42 CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); | 42 CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); |
| 43 CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); | 43 CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); |
| 44 CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); | 44 CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); |
| 45 CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); | 45 CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); |
| 46 CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); | 46 CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); |
| 47 | 47 |
| 48 ~CJS_Value(); | 48 ~CJS_Value(); |
| 49 CJS_Value(const CJS_Value& other); |
| 49 | 50 |
| 50 void SetNull(); | 51 void SetNull(); |
| 51 void Attach(v8::Local<v8::Value> pValue, Type t); | 52 void Attach(v8::Local<v8::Value> pValue, Type t); |
| 52 void Attach(CJS_Value* pValue); | 53 void Attach(CJS_Value* pValue); |
| 53 void Detach(); | 54 void Detach(); |
| 54 | 55 |
| 55 Type GetType() const; | 56 Type GetType() const; |
| 56 int ToInt() const; | 57 int ToInt() const; |
| 57 bool ToBool() const; | 58 bool ToBool() const; |
| 58 double ToDouble() const; | 59 double ToDouble() const; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 void StartGetting(); | 131 void StartGetting(); |
| 131 | 132 |
| 132 private: | 133 private: |
| 133 FX_BOOL m_bIsSetting; | 134 FX_BOOL m_bIsSetting; |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 class CJS_Array { | 137 class CJS_Array { |
| 137 public: | 138 public: |
| 138 CJS_Array(CJS_Runtime* pRuntime); | 139 CJS_Array(CJS_Runtime* pRuntime); |
| 139 virtual ~CJS_Array(); | 140 virtual ~CJS_Array(); |
| 141 CJS_Array(const CJS_Array& other); |
| 140 | 142 |
| 141 void Attach(v8::Local<v8::Array> pArray); | 143 void Attach(v8::Local<v8::Array> pArray); |
| 142 void GetElement(unsigned index, CJS_Value& value); | 144 void GetElement(unsigned index, CJS_Value& value); |
| 143 void SetElement(unsigned index, CJS_Value value); | 145 void SetElement(unsigned index, CJS_Value value); |
| 144 int GetLength(); | 146 int GetLength(); |
| 145 FX_BOOL IsAttached(); | 147 FX_BOOL IsAttached(); |
| 146 operator v8::Local<v8::Array>(); | 148 operator v8::Local<v8::Array>(); |
| 147 | 149 |
| 148 CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } | 150 CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } |
| 149 | 151 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // names as wchar_t string literals corresponding to each positional argument. | 223 // names as wchar_t string literals corresponding to each positional argument. |
| 222 // The result will always contain |nKeywords| value, with unspecified ones | 224 // The result will always contain |nKeywords| value, with unspecified ones |
| 223 // being set to type VT_unknown. | 225 // being set to type VT_unknown. |
| 224 std::vector<CJS_Value> JS_ExpandKeywordParams( | 226 std::vector<CJS_Value> JS_ExpandKeywordParams( |
| 225 CJS_Runtime* pRuntime, | 227 CJS_Runtime* pRuntime, |
| 226 const std::vector<CJS_Value>& originals, | 228 const std::vector<CJS_Value>& originals, |
| 227 size_t nKeywords, | 229 size_t nKeywords, |
| 228 ...); | 230 ...); |
| 229 | 231 |
| 230 #endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_ | 232 #endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_ |
| OLD | NEW |