From 05b9a317d66c29f740e4b0e89ea87143a11d61fc Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 15 Nov 2016 12:00:41 -0800 Subject: Cleaning methods and visibility in cfwl_* files. First pass at cleaning up visibility, return values and const'ness of cfwl_* class. Review-Url: https://codereview.chromium.org/2501743002 --- xfa/fxfa/app/xfa_ffapp.cpp | 2 +- xfa/fxfa/app/xfa_fwladapter.cpp | 9 ++++----- xfa/fxfa/app/xfa_fwladapter.h | 2 +- xfa/fxfa/xfa_ffapp.h | 8 ++++---- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp index ccdd6427ef..b38e59090e 100644 --- a/xfa/fxfa/app/xfa_ffapp.cpp +++ b/xfa/fxfa/app/xfa_ffapp.cpp @@ -131,7 +131,7 @@ CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() { } CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr( - CFWL_WidgetMgrDelegate* pDelegate) { + IFWL_WidgetMgrDelegate* pDelegate) { if (!m_pAdapterWidgetMgr) { m_pAdapterWidgetMgr.reset(new CXFA_FWLAdapterWidgetMgr); pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp index d827ad101f..ba38f853a6 100644 --- a/xfa/fxfa/app/xfa_fwladapter.cpp +++ b/xfa/fxfa/app/xfa_fwladapter.cpp @@ -13,18 +13,17 @@ CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() {} CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() {} -FWL_Error CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget, - const CFX_RectF* pRect) { +void CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget, + const CFX_RectF* pRect) { if (!pWidget) - return FWL_Error::Indefinite; + return; CXFA_FFWidget* pFFWidget = static_cast(pWidget->GetLayoutItem()); if (!pFFWidget) - return FWL_Error::Indefinite; + return; pFFWidget->AddInvalidateRect(nullptr); - return FWL_Error::Succeeded; } bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget, diff --git a/xfa/fxfa/app/xfa_fwladapter.h b/xfa/fxfa/app/xfa_fwladapter.h index cb10399ae7..489d8709ac 100644 --- a/xfa/fxfa/app/xfa_fwladapter.h +++ b/xfa/fxfa/app/xfa_fwladapter.h @@ -18,7 +18,7 @@ class CXFA_FWLAdapterWidgetMgr { CXFA_FWLAdapterWidgetMgr(); ~CXFA_FWLAdapterWidgetMgr(); - FWL_Error RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect); + void RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect); bool GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, diff --git a/xfa/fxfa/xfa_ffapp.h b/xfa/fxfa/xfa_ffapp.h index e7475de889..554b7b9328 100644 --- a/xfa/fxfa/xfa_ffapp.h +++ b/xfa/fxfa/xfa_ffapp.h @@ -16,13 +16,13 @@ #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fxfa/fxfa.h" -class CFWL_WidgetMgrDelegate; class CXFA_DefFontMgr; class CXFA_FWLAdapterWidgetMgr; class CXFA_FWLTheme; class CXFA_FFDocHandler; class CXFA_FontMgr; class IFWL_AdapterTimerMgr; +class IFWL_WidgetMgrDelegate; class CXFA_FileRead : public IFX_SeekableReadStream { public: @@ -51,7 +51,7 @@ class CXFA_FFApp { void SetDefaultFontMgr(std::unique_ptr pFontMgr); CXFA_FFDocHandler* GetDocHandler(); - CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate); + CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(IFWL_WidgetMgrDelegate* pDelegate); CFGAS_FontMgr* GetFDEFontMgr(); CXFA_FWLTheme* GetFWLTheme(); @@ -59,7 +59,7 @@ class CXFA_FFApp { const IFWL_App* GetFWLApp() const { return m_pFWLApp.get(); } IFWL_AdapterTimerMgr* GetTimerMgr() const; CXFA_FontMgr* GetXFAFontMgr() const; - CFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() const { + IFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() const { return m_pWidgetMgrDelegate; } @@ -86,7 +86,7 @@ class CXFA_FFApp { std::unique_ptr m_pFontSource; #endif std::unique_ptr m_pAdapterWidgetMgr; - CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned. + IFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned. // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former // may refers to theme manager and the latter refers to font manager. -- cgit v1.2.3