| 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_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 
| 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 
| 9 | 9 | 
| 10 #include "../../../core/include/fxcrt/fx_basic.h" | 10 #include "../../../core/include/fxcrt/fx_basic.h" | 
| 11 #include "../jsapi/fxjs_v8.h" | 11 #include "../jsapi/fxjs_v8.h" | 
| 12 | 12 | 
| 13 class CJS_Array; | 13 class CJS_Array; | 
| 14 class CJS_Date; | 14 class CJS_Date; | 
| 15 class CJS_Document; | 15 class CJS_Document; | 
| 16 class CJS_Object; | 16 class CJS_Object; | 
| 17 | 17 | 
| 18 class CJS_Value { | 18 class CJS_Value { | 
| 19  public: | 19  public: | 
| 20   CJS_Value(v8::Isolate* isolate); | 20   CJS_Value(v8::Isolate* isolate); | 
| 21   CJS_Value(v8::Isolate* isolate, v8::Local<v8::Value> pValue, FXJSVALUETYPE t); | 21   CJS_Value(v8::Isolate* isolate, v8::Local<v8::Value> pValue, FXJSVALUETYPE t); | 
| 22   CJS_Value(v8::Isolate* isolate, const int& iValue); | 22   CJS_Value(v8::Isolate* isolate, const int& iValue); | 
| 23   CJS_Value(v8::Isolate* isolate, const double& dValue); | 23   CJS_Value(v8::Isolate* isolate, const double& dValue); | 
| 24   CJS_Value(v8::Isolate* isolate, const float& fValue); | 24   CJS_Value(v8::Isolate* isolate, const float& fValue); | 
| 25   CJS_Value(v8::Isolate* isolate, const bool& bValue); | 25   CJS_Value(v8::Isolate* isolate, const bool& bValue); | 
| 26   CJS_Value(v8::Isolate* isolate, JSFXObject); | 26   CJS_Value(v8::Isolate* isolate, v8::Local<v8::Object>); | 
| 27   CJS_Value(v8::Isolate* isolate, CJS_Object*); | 27   CJS_Value(v8::Isolate* isolate, CJS_Object*); | 
| 28   CJS_Value(v8::Isolate* isolate, CJS_Document*); | 28   CJS_Value(v8::Isolate* isolate, CJS_Document*); | 
| 29   CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr); | 29   CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr); | 
| 30   CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr); | 30   CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr); | 
| 31   CJS_Value(v8::Isolate* isolate, CJS_Array& array); | 31   CJS_Value(v8::Isolate* isolate, CJS_Array& array); | 
| 32 | 32 | 
| 33   ~CJS_Value(); | 33   ~CJS_Value(); | 
| 34 | 34 | 
| 35   void SetNull(); | 35   void SetNull(); | 
| 36   void Attach(v8::Local<v8::Value> pValue, FXJSVALUETYPE t); | 36   void Attach(v8::Local<v8::Value> pValue, FXJSVALUETYPE t); | 
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 101   void operator>>(double&) const; | 101   void operator>>(double&) const; | 
| 102   void operator<<(CJS_Object* pObj); | 102   void operator<<(CJS_Object* pObj); | 
| 103   void operator>>(CJS_Object*& ppObj) const; | 103   void operator>>(CJS_Object*& ppObj) const; | 
| 104   void operator<<(CJS_Document* pJsDoc); | 104   void operator<<(CJS_Document* pJsDoc); | 
| 105   void operator>>(CJS_Document*& ppJsDoc) const; | 105   void operator>>(CJS_Document*& ppJsDoc) const; | 
| 106   void operator<<(CFX_ByteString); | 106   void operator<<(CFX_ByteString); | 
| 107   void operator>>(CFX_ByteString&) const; | 107   void operator>>(CFX_ByteString&) const; | 
| 108   void operator<<(CFX_WideString); | 108   void operator<<(CFX_WideString); | 
| 109   void operator>>(CFX_WideString&) const; | 109   void operator>>(CFX_WideString&) const; | 
| 110   void operator<<(const FX_WCHAR* c_string); | 110   void operator<<(const FX_WCHAR* c_string); | 
| 111   void operator<<(JSFXObject); | 111   void operator<<(v8::Local<v8::Object>); | 
| 112   void operator>>(JSFXObject&) const; | 112   void operator>>(v8::Local<v8::Object>&) const; | 
| 113   void operator>>(CJS_Array& array) const; | 113   void operator>>(CJS_Array& array) const; | 
| 114   void operator<<(CJS_Array& array); | 114   void operator<<(CJS_Array& array); | 
| 115   void operator<<(CJS_Date& date); | 115   void operator<<(CJS_Date& date); | 
| 116   void operator>>(CJS_Date& date) const; | 116   void operator>>(CJS_Date& date) const; | 
| 117   operator v8::Local<v8::Value>() const; | 117   operator v8::Local<v8::Value>() const; | 
| 118   void StartSetting(); | 118   void StartSetting(); | 
| 119   void StartGetting(); | 119   void StartGetting(); | 
| 120 | 120 | 
| 121  private: | 121  private: | 
| 122   FX_BOOL m_bIsSetting; | 122   FX_BOOL m_bIsSetting; | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184   MakeDate(int year, int mon, int mday, int hour, int min, int sec, int ms); | 184   MakeDate(int year, int mon, int mday, int hour, int min, int sec, int ms); | 
| 185 | 185 | 
| 186   FX_BOOL IsValidDate(); | 186   FX_BOOL IsValidDate(); | 
| 187 | 187 | 
| 188  protected: | 188  protected: | 
| 189   v8::Local<v8::Value> m_pDate; | 189   v8::Local<v8::Value> m_pDate; | 
| 190   v8::Isolate* m_isolate; | 190   v8::Isolate* m_isolate; | 
| 191 }; | 191 }; | 
| 192 | 192 | 
| 193 #endif  // FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 193 #endif  // FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ | 
| OLD | NEW | 
|---|