From 3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 2 Nov 2016 14:51:25 -0700 Subject: Merge delegates into IFWL_* classes. This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003 --- xfa/fwl/core/fwl_noteimp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fwl/core/fwl_noteimp.cpp') diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 2ca34f9619..2c67f6e34a 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -144,7 +144,7 @@ FX_BOOL CFWL_NoteDriver::SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify) { if (bNotify) { ms.m_dwExtend = 1; } - if (IFWL_WidgetDelegate* pDelegate = pPrev->GetCurrentDelegate()) + if (IFWL_WidgetDelegate* pDelegate = pPrev->GetDelegate()) pDelegate->OnProcessMessage(&ms); } if (pFocus) { @@ -160,7 +160,7 @@ FX_BOOL CFWL_NoteDriver::SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify) { ms.m_dwExtend = 1; } - if (IFWL_WidgetDelegate* pDelegate = pFocus->GetCurrentDelegate()) + if (IFWL_WidgetDelegate* pDelegate = pFocus->GetDelegate()) pDelegate->OnProcessMessage(&ms); } return TRUE; @@ -361,7 +361,7 @@ FX_BOOL CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage, } if (bRet) { if (IFWL_WidgetDelegate* pDelegate = - pMessage->m_pDstTarget->GetCurrentDelegate()) { + pMessage->m_pDstTarget->GetDelegate()) { pDelegate->OnProcessMessage(pMessage); } } @@ -707,7 +707,7 @@ int32_t CFWL_EventTarget::SetEventSource(IFWL_Widget* pSource, } FX_BOOL CFWL_EventTarget::ProcessEvent(CFWL_Event* pEvent) { - IFWL_WidgetDelegate* pDelegate = m_pListener->GetCurrentDelegate(); + IFWL_WidgetDelegate* pDelegate = m_pListener->GetDelegate(); if (!pDelegate) return FALSE; if (m_eventSources.GetCount() == 0) { -- cgit v1.2.3