Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: xfa/fwl/core/fwl_noteimp.cpp

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: Review feedback Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_widgetmgr.cpp ('k') | xfa/fwl/core/ifwl_combobox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_noteimp.cpp
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index 318fd9f6fc8c8ad21b76fc11e2b132223465fddd..22579571d40c69fae80df775fc0e767b49be36d3 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -144,10 +144,8 @@ FX_BOOL CFWL_NoteDriver::SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify) {
if (bNotify) {
ms.m_dwExtend = 1;
}
- IFWL_WidgetDelegate* pDelegate = pPrev->SetDelegate(nullptr);
- if (pDelegate) {
+ if (IFWL_WidgetDelegate* pDelegate = pPrev->GetCurrentDelegate())
pDelegate->OnProcessMessage(&ms);
- }
}
if (pFocus) {
IFWL_Widget* pWidget =
@@ -161,10 +159,9 @@ FX_BOOL CFWL_NoteDriver::SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify) {
if (bNotify) {
ms.m_dwExtend = 1;
}
- IFWL_WidgetDelegate* pDelegate = pFocus->SetDelegate(nullptr);
- if (pDelegate) {
+
+ if (IFWL_WidgetDelegate* pDelegate = pFocus->GetCurrentDelegate())
pDelegate->OnProcessMessage(&ms);
- }
}
return TRUE;
}
@@ -363,10 +360,10 @@ FX_BOOL CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage,
}
}
if (bRet) {
- IFWL_WidgetDelegate* pDelegate =
- pMessage->m_pDstTarget->SetDelegate(nullptr);
- if (pDelegate)
+ if (IFWL_WidgetDelegate* pDelegate =
+ pMessage->m_pDstTarget->GetCurrentDelegate()) {
pDelegate->OnProcessMessage(pMessage);
+ }
}
return bRet;
}
@@ -710,7 +707,7 @@ int32_t CFWL_EventTarget::SetEventSource(IFWL_Widget* pSource,
}
FX_BOOL CFWL_EventTarget::ProcessEvent(CFWL_Event* pEvent) {
- IFWL_WidgetDelegate* pDelegate = m_pListener->SetDelegate(nullptr);
+ IFWL_WidgetDelegate* pDelegate = m_pListener->GetCurrentDelegate();
if (!pDelegate)
return FALSE;
if (m_eventSources.GetCount() == 0) {
« no previous file with comments | « xfa/fwl/core/cfwl_widgetmgr.cpp ('k') | xfa/fwl/core/ifwl_combobox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698