From a440bb3f11f42b7a22624e9771dd8d9c57075f06 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 14 Sep 2016 07:01:54 -0700 Subject: Split CPDFXFA_Document apart [DO NOT COMMIT] This CL renames IXFA_DocProvider to IXFA_DocEnvironment to better describe the purpose. Then, CPDFXFA_Document has all of the IXFA_DocEnvironment methods removed and placed in CPDFXFA_DocEnvironment. The CPDFXFA_Document then has a CPDFXFA_DocEnvironment. This splits the code related to the document apart from the XFA callback methods to work with that document. Review-Url: https://codereview.chromium.org/2328573002 --- xfa/fxfa/include/fxfa.h | 6 +++--- xfa/fxfa/include/xfa_ffapp.h | 5 +++-- xfa/fxfa/include/xfa_ffdoc.h | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'xfa/fxfa/include') diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h index e7579e23fd..fde8d0f6c6 100644 --- a/xfa/fxfa/include/fxfa.h +++ b/xfa/fxfa/include/fxfa.h @@ -21,7 +21,7 @@ class CXFA_NodeList; class CXFA_WidgetAcc; class IFWL_AdapterTimerMgr; class IXFA_AppProvider; -class IXFA_DocProvider; +class IXFA_DocEnvironment; class IXFA_WidgetAccIterator; class IXFA_WidgetIterator; @@ -291,9 +291,9 @@ class IXFA_AppProvider { virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; }; -class IXFA_DocProvider { +class IXFA_DocEnvironment { public: - virtual ~IXFA_DocProvider() {} + virtual ~IXFA_DocEnvironment() {} virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; virtual void InvalidateRect(CXFA_FFPageView* pPageView, diff --git a/xfa/fxfa/include/xfa_ffapp.h b/xfa/fxfa/include/xfa_ffapp.h index 90bfcc0240..8a60ce6195 100644 --- a/xfa/fxfa/include/xfa_ffapp.h +++ b/xfa/fxfa/include/xfa_ffapp.h @@ -42,10 +42,11 @@ class CXFA_FFApp { explicit CXFA_FFApp(IXFA_AppProvider* pProvider); ~CXFA_FFApp(); - CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, + CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment, IFX_FileRead* pStream, FX_BOOL bTakeOverFile); - CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc); + CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment, + CPDF_Document* pPDFDoc); void SetDefaultFontMgr(std::unique_ptr pFontMgr); CXFA_FFDocHandler* GetDocHandler(); diff --git a/xfa/fxfa/include/xfa_ffdoc.h b/xfa/fxfa/include/xfa_ffdoc.h index ddbc0049f1..927301893b 100644 --- a/xfa/fxfa/include/xfa_ffdoc.h +++ b/xfa/fxfa/include/xfa_ffdoc.h @@ -27,9 +27,9 @@ struct FX_IMAGEDIB_AND_DPI { class CXFA_FFDoc { public: - CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider); + CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocEnvironment* pDocEnvironment); ~CXFA_FFDoc(); - IXFA_DocProvider* GetDocProvider() { return m_pDocProvider; } + IXFA_DocEnvironment* GetDocEnvironment() const { return m_pDocEnvironment; } uint32_t GetDocType(); int32_t StartLoad(); int32_t DoLoad(IFX_Pause* pPause = nullptr); @@ -54,7 +54,7 @@ class CXFA_FFDoc { FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE); protected: - IXFA_DocProvider* m_pDocProvider; + IXFA_DocEnvironment* const m_pDocEnvironment; std::unique_ptr m_pDocumentParser; IFX_FileRead* m_pStream; CXFA_FFApp* m_pApp; -- cgit v1.2.3