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

Unified Diff: xfa/fwl/core/cfwl_checkbox.h

Issue 2480233003: Fold DataProviders into parent classes (Closed)
Patch Set: 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
Index: xfa/fwl/core/cfwl_checkbox.h
diff --git a/xfa/fwl/core/cfwl_checkbox.h b/xfa/fwl/core/cfwl_checkbox.h
index 22574b4b9c4e9261d24c7f5dae764aeb7a535873..7bbf7f082b53663cd43303092bd95c1c254b9e5a 100644
--- a/xfa/fwl/core/cfwl_checkbox.h
+++ b/xfa/fwl/core/cfwl_checkbox.h
@@ -10,7 +10,7 @@
#include "xfa/fwl/core/cfwl_widget.h"
#include "xfa/fwl/core/ifwl_checkbox.h"
-class CFWL_CheckBox : public CFWL_Widget {
+class CFWL_CheckBox : public CFWL_Widget, public IFWL_CheckBoxDP {
public:
CFWL_CheckBox(const IFWL_App*);
~CFWL_CheckBox() override;
@@ -23,22 +23,15 @@ class CFWL_CheckBox : public CFWL_Widget {
FWL_Error SetCheckState(int32_t iCheck);
protected:
- class CFWL_CheckBoxDP : public IFWL_CheckBoxDP {
- public:
- CFWL_CheckBoxDP();
+ // IFWL_DataProvider
+ FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) override;
- // IFWL_DataProvider
- FWL_Error GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) override;
+ // IFWL_CheckBoxDP
+ FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) override;
- // IFWL_CheckBoxDP
- FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) override;
-
- FX_FLOAT m_fBoxHeight;
- CFX_WideString m_wsCaption;
- };
-
- CFWL_CheckBoxDP m_checkboxData;
+ FX_FLOAT m_fBoxHeight;
+ CFX_WideString m_wsCaption;
};
#endif // XFA_FWL_CORE_CFWL_CHECKBOX_H_

Powered by Google App Engine
This is Rietveld 408576698