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

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

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac 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 999a5a8443a2e03bbe449b23900b54eec8abb317..d0e2df88d0b2891fc2dcd0ed1d3bc75dc03b8ef1 100644
--- a/xfa/fwl/core/cfwl_widget.cpp
+++ b/xfa/fwl/core/cfwl_widget.cpp
@@ -127,11 +127,11 @@ FWL_Error CFWL_Widget::DrawWidget(CFX_Graphics* pGraphics,
return m_pIface->DrawWidget(pGraphics, pMatrix);
}
-IFWL_WidgetDelegate* CFWL_Widget::GetCurrentDelegate() {
- return m_pIface ? m_pIface->GetCurrentDelegate() : nullptr;
+std::unique_ptr<IFWL_WidgetDelegate> CFWL_Widget::ReleaseDelegate() {
+ return m_pIface ? m_pIface->ReleaseDelegate() : nullptr;
}
-void CFWL_Widget::SetCurrentDelegate(IFWL_WidgetDelegate* pDelegate) {
+void CFWL_Widget::SetDelegate(std::unique_ptr<IFWL_WidgetDelegate> pDelegate) {
if (m_pIface)
- m_pIface->SetCurrentDelegate(pDelegate);
+ m_pIface->SetDelegate(std::move(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