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 XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 explicit CXFA_ScriptContext(CXFA_Document* pDocument); | 23 explicit CXFA_ScriptContext(CXFA_Document* pDocument); |
24 ~CXFA_ScriptContext(); | 24 ~CXFA_ScriptContext(); |
25 | 25 |
26 void Initialize(v8::Isolate* pIsolate); | 26 void Initialize(v8::Isolate* pIsolate); |
27 void SetEventParam(CXFA_EventParam param) { m_eventParam = param; } | 27 void SetEventParam(CXFA_EventParam param) { m_eventParam = param; } |
28 CXFA_EventParam* GetEventParam() { return &m_eventParam; } | 28 CXFA_EventParam* GetEventParam() { return &m_eventParam; } |
29 FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, | 29 FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, |
30 const CFX_WideStringC& wsScript, | 30 const CFX_WideStringC& wsScript, |
31 CFXJSE_Value* pRetValue, | 31 CFXJSE_Value* pRetValue, |
32 CXFA_Object* pThisObject = NULL); | 32 CXFA_Object* pThisObject = nullptr); |
33 | 33 |
34 int32_t ResolveObjects(CXFA_Object* refNode, | 34 int32_t ResolveObjects(CXFA_Object* refNode, |
35 const CFX_WideStringC& wsExpression, | 35 const CFX_WideStringC& wsExpression, |
36 XFA_RESOLVENODE_RS& resolveNodeRS, | 36 XFA_RESOLVENODE_RS& resolveNodeRS, |
37 uint32_t dwStyles = XFA_RESOLVENODE_Children, | 37 uint32_t dwStyles = XFA_RESOLVENODE_Children, |
38 CXFA_Node* bindNode = NULL); | 38 CXFA_Node* bindNode = nullptr); |
39 CFXJSE_Value* GetJSValueFromMap(CXFA_Object* pObject); | 39 CFXJSE_Value* GetJSValueFromMap(CXFA_Object* pObject); |
40 void CacheList(CXFA_NodeList* pList) { m_CacheListArray.Add(pList); } | 40 void CacheList(CXFA_NodeList* pList) { m_CacheListArray.Add(pList); } |
41 CXFA_Object* GetThisObject() const { return m_pThisObject; } | 41 CXFA_Object* GetThisObject() const { return m_pThisObject; } |
42 v8::Isolate* GetRuntime() const { return m_pIsolate; } | 42 v8::Isolate* GetRuntime() const { return m_pIsolate; } |
43 | 43 |
44 int32_t GetIndexByName(CXFA_Node* refNode); | 44 int32_t GetIndexByName(CXFA_Node* refNode); |
45 int32_t GetIndexByClassName(CXFA_Node* refNode); | 45 int32_t GetIndexByClassName(CXFA_Node* refNode); |
46 void GetSomExpression(CXFA_Node* refNode, CFX_WideString& wsExpression); | 46 void GetSomExpression(CXFA_Node* refNode, CFX_WideString& wsExpression); |
47 | 47 |
48 void SetNodesOfRunScript(CXFA_NodeArray* pArray); | 48 void SetNodesOfRunScript(CXFA_NodeArray* pArray); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray; | 114 CFX_ArrayTemplate<CXFA_NodeList*> m_CacheListArray; |
115 CXFA_NodeArray* m_pScriptNodeArray; | 115 CXFA_NodeArray* m_pScriptNodeArray; |
116 CXFA_ResolveProcessor* m_pResolveProcessor; | 116 CXFA_ResolveProcessor* m_pResolveProcessor; |
117 CXFA_FM2JSContext* m_hFM2JSContext; | 117 CXFA_FM2JSContext* m_hFM2JSContext; |
118 CXFA_Object* m_pThisObject; | 118 CXFA_Object* m_pThisObject; |
119 uint32_t m_dwBuiltInInFlags; | 119 uint32_t m_dwBuiltInInFlags; |
120 XFA_ATTRIBUTEENUM m_eRunAtType; | 120 XFA_ATTRIBUTEENUM m_eRunAtType; |
121 }; | 121 }; |
122 | 122 |
123 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ | 123 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_IMP_H_ |
OLD | NEW |