summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_pushbuttontp.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-10 11:29:57 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-10 11:29:57 -0700
commit4e62b5c7c5a35c7020d581fb65de4b3fc5ad3c1a (patch)
treeb3a46fd89073a9935bb3821d5f2638effc9617d7 /xfa/fwl/theme/cfwl_pushbuttontp.h
parentd83842e0b9ef6e25ab28642e2a146159ac9f3596 (diff)
downloadpdfium-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_pushbuttontp.h')
-rw-r--r--xfa/fwl/theme/cfwl_pushbuttontp.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.h b/xfa/fwl/theme/cfwl_pushbuttontp.h
index 6312cd5f29..6c091f7ffd 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.h
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.h
@@ -7,6 +7,8 @@
#ifndef XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_
#define XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_
+#include <memory>
+
#include "xfa/fwl/theme/cfwl_widgettp.h"
class CFWL_PushButtonTP : public CFWL_WidgetTP {
@@ -41,9 +43,10 @@ class CFWL_PushButtonTP : public CFWL_WidgetTP {
void SetBackgroudColor(uint32_t* pData);
void SetCaptionColor(uint32_t* pData);
void SetCornerColor(uint32_t* pData);
- int32_t GetColorID(uint32_t dwStates);
- struct PBThemeData* m_pThemeData;
+ int32_t GetColorID(uint32_t dwStates) const;
+
+ std::unique_ptr<PBThemeData> m_pThemeData;
};
#endif // XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_