diff options
Diffstat (limited to 'xfa/fwl/core/ifwl_scrollbar.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_scrollbar.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp index 27a131f45d..a66baddc74 100644 --- a/xfa/fwl/core/ifwl_scrollbar.cpp +++ b/xfa/fwl/core/ifwl_scrollbar.cpp @@ -6,6 +6,7 @@ #include "xfa/fwl/core/ifwl_scrollbar.h" +#include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_message.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" @@ -51,20 +52,11 @@ IFWL_ScrollBar::IFWL_ScrollBar(const IFWL_App* app, m_rtMaxBtn.Reset(); m_rtMinTrack.Reset(); m_rtMaxTrack.Reset(); -} - -IFWL_ScrollBar::~IFWL_ScrollBar() {} -void IFWL_ScrollBar::Initialize() { - IFWL_Widget::Initialize(); - m_pDelegate = new CFWL_ScrollBarImpDelegate(this); + SetDelegate(pdfium::MakeUnique<CFWL_ScrollBarImpDelegate>(this)); } -void IFWL_ScrollBar::Finalize() { - delete m_pDelegate; - m_pDelegate = nullptr; - IFWL_Widget::Finalize(); -} +IFWL_ScrollBar::~IFWL_ScrollBar() {} FWL_Type IFWL_ScrollBar::GetClassID() const { return FWL_Type::ScrollBar; |