xref: /aosp_15_r20/external/pdfium/xfa/fxfa/parser/cxfa_nodeowner.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2018 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_NODEOWNER_H_
8 #define XFA_FXFA_PARSER_CXFA_NODEOWNER_H_
9 
10 #include <vector>
11 
12 #include "fxjs/gc/heap.h"
13 #include "v8/include/cppgc/garbage-collected.h"
14 #include "v8/include/cppgc/member.h"
15 #include "v8/include/cppgc/visitor.h"
16 
17 class CXFA_List;
18 
19 class CXFA_NodeOwner : public cppgc::GarbageCollected<CXFA_NodeOwner> {
20  public:
21   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
22   ~CXFA_NodeOwner();
23 
24   void Trace(cppgc::Visitor* visitor) const;
25   void PersistList(CXFA_List* list);
26 
27  private:
28   CXFA_NodeOwner();
29 
30   std::vector<cppgc::Member<CXFA_List>> lists_;
31 };
32 
33 #endif  // XFA_FXFA_PARSER_CXFA_NODEOWNER_H_
34