Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: xfa/fwl/core/ifwl_scrollbar.cpp

Issue 2464703006: Fold IFWL*::{Initialize|Finalize} into constructor/destructor (Closed)
Patch Set: Rebase to master Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_scrollbar.h ('k') | xfa/fwl/core/ifwl_spinbutton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_scrollbar.cpp
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp
index 27a131f45d985945012d91c3d0a8dc8963c50d12..a66baddc74add7a999d4fc5d84b5caae291c8aa5 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;
« no previous file with comments | « xfa/fwl/core/ifwl_scrollbar.h ('k') | xfa/fwl/core/ifwl_spinbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698