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

Unified Diff: xfa/fwl/core/cfwl_widget.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_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_widget.cpp
diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp
index 9aeb127e9e67d1f91d1e993ca75a410876a2896c..d277f26a767b30c72eeefd1c7f356c9f74f2d088 100644
--- a/xfa/fwl/core/cfwl_widget.cpp
+++ b/xfa/fwl/core/cfwl_widget.cpp
@@ -20,7 +20,6 @@
CFWL_Widget::CFWL_Widget(const IFWL_App* app)
: m_pApp(app),
- m_pDelegate(nullptr),
m_pWidgetMgr(app->GetWidgetMgr()),
m_pProperties(new CFWL_WidgetProperties) {
ASSERT(m_pWidgetMgr);
@@ -131,10 +130,11 @@ FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics,
return m_pIface->DrawWidget(pGraphics, pMatrix);
}
-IFWL_WidgetDelegate* CFWL_Widget::SetDelegate(IFWL_WidgetDelegate* pDelegate) {
- if (!m_pIface)
- return nullptr;
+IFWL_WidgetDelegate* CFWL_Widget::GetCurrentDelegate() {
+ return m_pIface ? m_pIface->GetCurrentDelegate() : nullptr;
+}
- m_pDelegate = m_pIface->SetDelegate(pDelegate);
- return m_pDelegate;
+void CFWL_Widget::SetCurrentDelegate(IFWL_WidgetDelegate* pDelegate) {
+ if (m_pIface)
+ m_pIface->SetCurrentDelegate(pDelegate);
}
« no previous file with comments | « xfa/fwl/core/cfwl_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698