diff options
author | tsepez <tsepez@chromium.org> | 2016-12-07 19:01:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-07 19:01:56 -0800 |
commit | 64f4e25304dfd93651ac5c9d5379ed2fffbb993f (patch) | |
tree | 67f755611451432631bd27c494236b8b6ee418b4 /xfa/fde/xml/fde_xml_imp.h | |
parent | 1306b180a6a8e306a7d00db9cdaa983784c354ed (diff) | |
download | pdfium-64f4e25304dfd93651ac5c9d5379ed2fffbb993f.tar.xz |
Use unique_ptr for CXFA_XMLParser.
Also rename CFDE_XMLParser to IFDE_XMLParser since its an interface.
Review-Url: https://codereview.chromium.org/2555373002
Diffstat (limited to 'xfa/fde/xml/fde_xml_imp.h')
-rw-r--r-- | xfa/fde/xml/fde_xml_imp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h index 283184aadc..8571f1b9f1 100644 --- a/xfa/fde/xml/fde_xml_imp.h +++ b/xfa/fde/xml/fde_xml_imp.h @@ -7,6 +7,8 @@ #ifndef XFA_FDE_XML_FDE_XML_IMP_H_ #define XFA_FDE_XML_FDE_XML_IMP_H_ +#include <memory> + #include "core/fxcrt/fx_system.h" #include "xfa/fde/xml/fde_xml.h" #include "xfa/fgas/crt/fgas_memory.h" @@ -19,8 +21,8 @@ class CFDE_XMLElement; class CFDE_XMLText; class CFDE_XMLDoc; class CFDE_XMLDOMParser; -class CFDE_XMLParser; class CFDE_XMLSyntaxParser; +class IFDE_XMLParser; class CFDE_XMLNode : public CFX_Target { public: @@ -193,7 +195,7 @@ class CFDE_XMLDoc : public CFX_Target { CFDE_XMLDoc(); ~CFDE_XMLDoc() override; - bool LoadXML(CFDE_XMLParser* pXMLParser); + bool LoadXML(std::unique_ptr<IFDE_XMLParser> pXMLParser); int32_t DoLoad(IFX_Pause* pPause = nullptr); void CloseXML(); CFDE_XMLNode* GetRoot() const { return m_pRoot; } @@ -209,14 +211,12 @@ class CFDE_XMLDoc : public CFX_Target { int32_t m_iStatus; CFDE_XMLNode* m_pRoot; CFDE_XMLSyntaxParser* m_pSyntaxParser; - CFDE_XMLParser* m_pXMLParser; + std::unique_ptr<IFDE_XMLParser> m_pXMLParser; }; -class CFDE_XMLParser { +class IFDE_XMLParser { public: - virtual ~CFDE_XMLParser() {} - - virtual void Release() = 0; + virtual ~IFDE_XMLParser() {} virtual int32_t DoParser(IFX_Pause* pPause) = 0; }; |