summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_pushbutton.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-07 10:28:47 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-07 10:28:47 -0800
commiteb3f68cc7f25a1e28464eb251161b8f08fcd04bc (patch)
tree36e565bac1a7760e605b181b7da4c08bda151cdd /xfa/fwl/core/cfwl_pushbutton.cpp
parenta97fc7c6392c0adbd702bdf898cb9e20cee00a3e (diff)
downloadpdfium-eb3f68cc7f25a1e28464eb251161b8f08fcd04bc.tar.xz
Fold DataProviders into parent classes
This CL removes the data provider classes and folds the code into the parent classes. Review-Url: https://codereview.chromium.org/2480233003
Diffstat (limited to 'xfa/fwl/core/cfwl_pushbutton.cpp')
-rw-r--r--xfa/fwl/core/cfwl_pushbutton.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp
index 1b98d2514e..888c127782 100644
--- a/xfa/fwl/core/cfwl_pushbutton.cpp
+++ b/xfa/fwl/core/cfwl_pushbutton.cpp
@@ -10,7 +10,8 @@
#include "third_party/base/ptr_util.h"
-CFWL_PushButton::CFWL_PushButton(const IFWL_App* app) : CFWL_Widget(app) {}
+CFWL_PushButton::CFWL_PushButton(const IFWL_App* app)
+ : CFWL_Widget(app), m_pBitmap(nullptr) {}
CFWL_PushButton::~CFWL_PushButton() {}
@@ -18,38 +19,36 @@ void CFWL_PushButton::Initialize() {
ASSERT(!m_pIface);
m_pIface = pdfium::MakeUnique<IFWL_PushButton>(
- m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(&m_buttonData));
+ m_pApp, pdfium::MakeUnique<CFWL_WidgetProperties>(this));
CFWL_Widget::Initialize();
}
FWL_Error CFWL_PushButton::GetCaption(CFX_WideString& wsCaption) {
- wsCaption = m_buttonData.m_wsCaption;
+ wsCaption = m_wsCaption;
return FWL_Error::Succeeded;
}
FWL_Error CFWL_PushButton::SetCaption(const CFX_WideStringC& wsCaption) {
- m_buttonData.m_wsCaption = wsCaption;
+ m_wsCaption = wsCaption;
return FWL_Error::Succeeded;
}
CFX_DIBitmap* CFWL_PushButton::GetPicture() {
- return m_buttonData.m_pBitmap;
+ return m_pBitmap;
}
FWL_Error CFWL_PushButton::SetPicture(CFX_DIBitmap* pBitmap) {
- m_buttonData.m_pBitmap = pBitmap;
+ m_pBitmap = pBitmap;
return FWL_Error::Succeeded;
}
-FWL_Error CFWL_PushButton::CFWL_PushButtonDP::GetCaption(
- IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) {
+FWL_Error CFWL_PushButton::GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) {
wsCaption = m_wsCaption;
return FWL_Error::Succeeded;
}
-CFX_DIBitmap* CFWL_PushButton::CFWL_PushButtonDP::GetPicture(
- IFWL_Widget* pWidget) {
+CFX_DIBitmap* CFWL_PushButton::GetPicture(IFWL_Widget* pWidget) {
return m_pBitmap;
}