Index: fpdfsdk/javascript/JS_GlobalData.h |
diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h |
index 8273c0838c0371e7923069638c2d81afa23f6786..d901ec58b37460e4f6ef289ca3d3843b595b8130 100644 |
--- a/fpdfsdk/javascript/JS_GlobalData.h |
+++ b/fpdfsdk/javascript/JS_GlobalData.h |
@@ -11,49 +11,14 @@ |
#include <vector> |
#include "core/fxcrt/include/fx_basic.h" |
+#include "fpdfsdk/javascript/JS_KeyValue.h" |
-#define JS_GLOBALDATA_TYPE_NUMBER 0 |
-#define JS_GLOBALDATA_TYPE_BOOLEAN 1 |
-#define JS_GLOBALDATA_TYPE_STRING 2 |
-#define JS_GLOBALDATA_TYPE_OBJECT 3 |
-#define JS_GLOBALDATA_TYPE_NULL 4 |
- |
-class CJS_KeyValue; |
class CPDFDoc_Environment; |
-class CJS_GlobalVariableArray { |
- public: |
- CJS_GlobalVariableArray(); |
- virtual ~CJS_GlobalVariableArray(); |
- |
- void Add(CJS_KeyValue* p); |
- int Count() const; |
- CJS_KeyValue* GetAt(int index) const; |
- void Copy(const CJS_GlobalVariableArray& array); |
- |
- void Empty(); |
- |
- private: |
- CFX_ArrayTemplate<CJS_KeyValue*> m_Array; |
-}; |
- |
-class CJS_KeyValue { |
- public: |
- CJS_KeyValue(); |
- virtual ~CJS_KeyValue(); |
- |
- CFX_ByteString sKey; |
- int nType; // 0:int 1:bool 2:string 3:obj |
- double dData; |
- bool bData; |
- CFX_ByteString sData; |
- CJS_GlobalVariableArray objData; |
-}; |
- |
class CJS_GlobalData_Element { |
public: |
CJS_GlobalData_Element() {} |
- virtual ~CJS_GlobalData_Element() {} |
+ ~CJS_GlobalData_Element() {} |
CJS_KeyValue data; |
FX_BOOL bPersistent; |
@@ -84,8 +49,6 @@ class CJS_GlobalData { |
using const_iterator = |
std::vector<std::unique_ptr<CJS_GlobalData_Element>>::const_iterator; |
- static CJS_GlobalData* g_Instance; |
- |
CJS_GlobalData(); |
~CJS_GlobalData(); |