diff options
author | weili <weili@chromium.org> | 2016-08-10 11:29:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-10 11:29:57 -0700 |
commit | 4e62b5c7c5a35c7020d581fb65de4b3fc5ad3c1a (patch) | |
tree | b3a46fd89073a9935bb3821d5f2638effc9617d7 /xfa/fwl/theme/cfwl_monthcalendartp.h | |
parent | d83842e0b9ef6e25ab28642e2a146159ac9f3596 (diff) | |
download | pdfium-4e62b5c7c5a35c7020d581fb65de4b3fc5ad3c1a.tar.xz |
Use smart pointers for class owned pointers in xfa/fwl/theme
Use smart pointers instead of raw pointer to make memory management
easier for classes under xfa/fwl/theme.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2230813002
Diffstat (limited to 'xfa/fwl/theme/cfwl_monthcalendartp.h')
-rw-r--r-- | xfa/fwl/theme/cfwl_monthcalendartp.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.h b/xfa/fwl/theme/cfwl_monthcalendartp.h index 7ecbb90cf2..b10258a7f9 100644 --- a/xfa/fwl/theme/cfwl_monthcalendartp.h +++ b/xfa/fwl/theme/cfwl_monthcalendartp.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ #define XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_ +#include <memory> + #include "xfa/fwl/theme/cfwl_widgettp.h" class CFWL_MonthCalendarTP : public CFWL_WidgetTP { @@ -27,6 +29,16 @@ class CFWL_MonthCalendarTP : public CFWL_WidgetTP { FWL_Error Finalize() override; protected: + struct MCThemeData { + FX_ARGB clrCaption; + FX_ARGB clrSeperator; + FX_ARGB clrDatesHoverBK; + FX_ARGB clrDatesSelectedBK; + FX_ARGB clrDatesCircle; + FX_ARGB clrToday; + FX_ARGB clrBK; + }; + FX_BOOL DrawTotalBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); FX_BOOL DrawHeadBk(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); FX_BOOL DrawLButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); @@ -39,16 +51,7 @@ class CFWL_MonthCalendarTP : public CFWL_WidgetTP { FWLTHEME_STATE GetState(uint32_t dwFWLStates); void SetThemeData(uint32_t dwThemeID); - class MCThemeData { - public: - FX_ARGB clrCaption; - FX_ARGB clrSeperator; - FX_ARGB clrDatesHoverBK; - FX_ARGB clrDatesSelectedBK; - FX_ARGB clrDatesCircle; - FX_ARGB clrToday; - FX_ARGB clrBK; - } * m_pThemeData; + std::unique_ptr<MCThemeData> m_pThemeData; CFX_WideString wsResource; }; |