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 #ifndef XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_ 8 #define XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_ 9 10 #include "fxjs/gc/heap.h" 11 #include "v8/include/cppgc/garbage-collected.h" 12 #include "xfa/fwl/cfwl_widgetmgr.h" 13 14 class CFX_RectF; 15 16 class CXFA_FWLAdapterWidgetMgr final 17 : public cppgc::GarbageCollected<CXFA_FWLAdapterWidgetMgr>, 18 public CFWL_WidgetMgr::AdapterIface { 19 public: 20 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 21 ~CXFA_FWLAdapterWidgetMgr() override; 22 23 // CFWL_WidgetMgr::AdapterIface: 24 void Trace(cppgc::Visitor* visitor) const override; 25 void RepaintWidget(pdfium::CFWL_Widget* pWidget) override; 26 bool GetPopupPos(pdfium::CFWL_Widget* pWidget, 27 float fMinHeight, 28 float fMaxHeight, 29 const CFX_RectF& rtAnchor, 30 CFX_RectF* pPopupRect) override; 31 32 private: 33 CXFA_FWLAdapterWidgetMgr(); 34 }; 35 36 #endif // XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_ 37