| 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 13 matching lines...) Expand all Loading... |
| 24 VT_unknown, | 24 VT_unknown, |
| 25 VT_string, | 25 VT_string, |
| 26 VT_number, | 26 VT_number, |
| 27 VT_boolean, | 27 VT_boolean, |
| 28 VT_date, | 28 VT_date, |
| 29 VT_object, | 29 VT_object, |
| 30 VT_null, | 30 VT_null, |
| 31 VT_undefined | 31 VT_undefined |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 CJS_Value(CJS_Runtime* pRuntime); | 34 explicit CJS_Value(CJS_Runtime* pRuntime); |
| 35 CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue); | 35 CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue); |
| 36 CJS_Value(CJS_Runtime* pRuntime, const int& iValue); | 36 CJS_Value(CJS_Runtime* pRuntime, const int& iValue); |
| 37 CJS_Value(CJS_Runtime* pRuntime, const double& dValue); | 37 CJS_Value(CJS_Runtime* pRuntime, const double& dValue); |
| 38 CJS_Value(CJS_Runtime* pRuntime, const float& fValue); | 38 CJS_Value(CJS_Runtime* pRuntime, const float& fValue); |
| 39 CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); | 39 CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); |
| 40 CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); | 40 CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); |
| 41 CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); | 41 CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); |
| 42 CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); | 42 CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); |
| 43 CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); | 43 CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); |
| 44 CJS_Value(const CJS_Value& other); |
| 44 | 45 |
| 45 ~CJS_Value(); | 46 ~CJS_Value(); |
| 46 CJS_Value(const CJS_Value& other); | |
| 47 | 47 |
| 48 void SetNull(); | 48 void SetNull(); |
| 49 void Attach(v8::Local<v8::Value> pValue); | 49 void Attach(v8::Local<v8::Value> pValue); |
| 50 void Attach(CJS_Value* pValue); | |
| 51 void Detach(); | 50 void Detach(); |
| 52 | 51 |
| 53 static Type GetValueType(v8::Local<v8::Value> value); | 52 static Type GetValueType(v8::Local<v8::Value> value); |
| 54 Type GetType() const { return GetValueType(m_pValue); } | 53 Type GetType() const { return GetValueType(m_pValue); } |
| 55 int ToInt() const; | 54 int ToInt() const; |
| 56 bool ToBool() const; | 55 bool ToBool() const; |
| 57 double ToDouble() const; | 56 double ToDouble() const; |
| 58 float ToFloat() const; | 57 float ToFloat() const; |
| 59 CJS_Object* ToCJSObject() const; | 58 CJS_Object* ToCJSObject() const; |
| 60 CFX_WideString ToCFXWideString() const; | 59 CFX_WideString ToCFXWideString() const; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // names as wchar_t string literals corresponding to each positional argument. | 217 // names as wchar_t string literals corresponding to each positional argument. |
| 219 // The result will always contain |nKeywords| value, with unspecified ones | 218 // The result will always contain |nKeywords| value, with unspecified ones |
| 220 // being set to type VT_unknown. | 219 // being set to type VT_unknown. |
| 221 std::vector<CJS_Value> JS_ExpandKeywordParams( | 220 std::vector<CJS_Value> JS_ExpandKeywordParams( |
| 222 CJS_Runtime* pRuntime, | 221 CJS_Runtime* pRuntime, |
| 223 const std::vector<CJS_Value>& originals, | 222 const std::vector<CJS_Value>& originals, |
| 224 size_t nKeywords, | 223 size_t nKeywords, |
| 225 ...); | 224 ...); |
| 226 | 225 |
| 227 #endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_ | 226 #endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_ |
| OLD | NEW |