1 // Copyright 2014 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 #include "xfa/fwl/cfwl_app.h" 8 9 #include "v8/include/cppgc/allocation.h" 10 #include "xfa/fwl/cfwl_notedriver.h" 11 #include "xfa/fwl/cfwl_widget.h" 12 #include "xfa/fwl/cfwl_widgetmgr.h" 13 14 namespace pdfium { 15 CFWL_App(AdapterIface * pAdapter)16CFWL_App::CFWL_App(AdapterIface* pAdapter) 17 : m_pAdapter(pAdapter), 18 m_pWidgetMgr(cppgc::MakeGarbageCollected<CFWL_WidgetMgr>( 19 pAdapter->GetHeap()->GetAllocationHandle(), 20 pAdapter->GetWidgetMgrAdapter(), 21 this)), 22 m_pNoteDriver(cppgc::MakeGarbageCollected<CFWL_NoteDriver>( 23 pAdapter->GetHeap()->GetAllocationHandle(), 24 this)) {} 25 26 CFWL_App::~CFWL_App() = default; 27 Trace(cppgc::Visitor * visitor) const28void CFWL_App::Trace(cppgc::Visitor* visitor) const { 29 visitor->Trace(m_pAdapter); 30 visitor->Trace(m_pWidgetMgr); 31 visitor->Trace(m_pNoteDriver); 32 } 33 34 } // namespace pdfium 35