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

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

Issue 2480233003: Fold DataProviders into parent classes (Closed)
Patch Set: Review feedback 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/cfwl_pushbutton.h ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_pushbutton.cpp
diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp
index 1b98d2514e92314bb734f7827a20122f5dc5e4dc..888c1277823827f2ccb6ae36dd54bb5d7ad30574 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;
}
« no previous file with comments | « xfa/fwl/core/cfwl_pushbutton.h ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698