1 // Copyright 2017 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FXFA_PARSER_CXFA_THISPROXY_H_ 8 #define XFA_FXFA_PARSER_CXFA_THISPROXY_H_ 9 10 #include "v8/include/cppgc/member.h" 11 #include "v8/include/cppgc/visitor.h" 12 #include "xfa/fxfa/parser/cxfa_object.h" 13 14 class CXFA_Node; 15 class CXFA_Script; 16 17 class CXFA_ThisProxy final : public CXFA_Object { 18 public: 19 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 20 ~CXFA_ThisProxy() override; 21 22 void Trace(cppgc::Visitor* visitor) const override; 23 GetThisNode()24 CXFA_Node* GetThisNode() const { return m_pThisNode; } GetScriptNode()25 CXFA_Script* GetScriptNode() const { return m_pScriptNode; } 26 27 private: 28 CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Script* pScriptNode); 29 30 cppgc::Member<CXFA_Node> m_pThisNode; 31 cppgc::Member<CXFA_Script> m_pScriptNode; 32 }; 33 34 #endif // XFA_FXFA_PARSER_CXFA_THISPROXY_H_ 35