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

Unified Diff: xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp

Issue 1460883002: Make IFWL_Target::m_pImpl a private member. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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
Index: xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp
index f8cfa107ea84c7c7e7c2b9e9962e4e6520805e22..c1b8d3e07d8a73bb2e08c81d86bbd1fa9669cb18 100644
--- a/xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp
@@ -13,24 +13,20 @@ IFWL_PictureBox* IFWL_PictureBox::Create() {
return new IFWL_PictureBox;
}
IFWL_PictureBox::IFWL_PictureBox() {
- m_pImpl = NULL;
-}
-IFWL_PictureBox::~IFWL_PictureBox() {
- if (m_pImpl) {
- delete (CFWL_PictureBoxImp*)m_pImpl;
- m_pImpl = NULL;
- }
}
FWL_ERR IFWL_PictureBox::Initialize(IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_PictureBoxImp(pOuter);
- ((CFWL_PictureBoxImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_PictureBoxImp*)m_pImpl)->Initialize();
+ CFWL_PictureBoxImp* pPictureBoxImpl = new CFWL_PictureBoxImp(pOuter);
+ SetImpl(pPictureBoxImpl);
+ pPictureBoxImpl->SetInterface(this);
+ return pPictureBoxImpl->Initialize();
}
FWL_ERR IFWL_PictureBox::Initialize(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_PictureBoxImp(properties, pOuter);
- ((CFWL_PictureBoxImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_PictureBoxImp*)m_pImpl)->Initialize();
+ CFWL_PictureBoxImp* pPictureBoxImpl =
+ new CFWL_PictureBoxImp(properties, pOuter);
+ SetImpl(pPictureBoxImpl);
+ pPictureBoxImpl->SetInterface(this);
+ return pPictureBoxImpl->Initialize();
}
CFWL_PictureBoxImp::CFWL_PictureBoxImp(IFWL_Widget* pOuter)
: CFWL_WidgetImp(pOuter),

Powered by Google App Engine
This is Rietveld 408576698