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

Unified Diff: xfa/fwl/theme/cfwl_widgettp.h

Issue 2227883002: Use smart pointers for class owned pointers in xfa/fxfa (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 4 months 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/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_widgettp.h
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index 8a1e0c152a6b21b1e4151e5afa87064cf45e1972..e6d09326c2495ca5e7dfaf7c5394a0a53ff1812c 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -236,23 +236,24 @@ class CFWL_FontData {
public:
CFWL_FontData();
virtual ~CFWL_FontData();
+
FX_BOOL Equal(const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
- CFGAS_GEFont* GetFont() const { return m_pFont; }
+ CFGAS_GEFont* GetFont() const { return m_pFont.get(); }
protected:
CFX_WideString m_wsFamily;
uint32_t m_dwStyles;
uint32_t m_dwCodePage;
- CFGAS_GEFont* m_pFont;
- IFGAS_FontMgr* m_pFontMgr;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- CFX_FontSourceEnum_File* m_pFontSource;
+ std::unique_ptr<CFX_FontSourceEnum_File> m_pFontSource;
#endif
+ std::unique_ptr<IFGAS_FontMgr> m_pFontMgr;
+ std::unique_ptr<CFGAS_GEFont> m_pFont;
};
class CFWL_FontManager {
« no previous file with comments | « xfa/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fwl/theme/cfwl_widgettp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698