From a5eb9f05b7c3f82630784e043ccf75c4e019b18f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 21 Sep 2017 15:43:56 -0400 Subject: Cleanup WidgetMgr ownership The CXFA_FFApp can get the FWLWidgetMgr from the CFWL_App and does not need to store a copy. This removes the need to pass the delegate into the GetFWLAdapterWidgetMgr() method and we can set the capabilities directy. Change-Id: If4794d07fa0fb5dd32b816a21f04e6d7710886ca Reviewed-on: https://pdfium-review.googlesource.com/14611 Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima --- xfa/fwl/cfwl_widgetmgr.cpp | 8 ++------ xfa/fwl/cfwl_widgetmgr.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'xfa/fwl') diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index 4f697361c5..a0f6e3a18c 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -29,8 +29,8 @@ struct FWL_NEEDREPAINTHITDATA { } // namespace CFWL_WidgetMgr::CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative) - : m_dwCapability(0), - m_pAdapter(pAdapterNative->GetFWLAdapterWidgetMgr(this)) { + : m_dwCapability(FWL_WGTMGR_DisableForm), + m_pAdapter(pAdapterNative->GetFWLAdapterWidgetMgr()) { ASSERT(m_pAdapter); m_mapWidgetItem[nullptr] = pdfium::MakeUnique(); #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) @@ -386,10 +386,6 @@ void CFWL_WidgetMgr::GetAdapterPopupPos(CFWL_Widget* pWidget, m_pAdapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, rtPopup); } -void CFWL_WidgetMgr::OnSetCapability(uint32_t dwCapability) { - m_dwCapability = dwCapability; -} - void CFWL_WidgetMgr::OnProcessMessageToForm(CFWL_Message* pMessage) { if (!pMessage) return; diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h index f633ba8706..c7e48a1f60 100644 --- a/xfa/fwl/cfwl_widgetmgr.h +++ b/xfa/fwl/cfwl_widgetmgr.h @@ -28,7 +28,6 @@ class CFWL_WidgetMgr { explicit CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative); ~CFWL_WidgetMgr(); - void OnSetCapability(uint32_t dwCapability); void OnProcessMessageToForm(CFWL_Message* pMessage); void OnDrawWidget(CFWL_Widget* pWidget, CXFA_Graphics* pGraphics, -- cgit v1.2.3