| Index: xfa/fwl/core/ifwl_widget.h
|
| diff --git a/xfa/fwl/core/ifwl_widget.h b/xfa/fwl/core/ifwl_widget.h
|
| index 264ff67513396f4474c17609028a0ed2c2e80e05..e00998c39e8540fc0094457ae5bcb9c4246914c7 100644
|
| --- a/xfa/fwl/core/ifwl_widget.h
|
| +++ b/xfa/fwl/core/ifwl_widget.h
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "core/fxcrt/fx_coordinates.h"
|
| #include "core/fxcrt/fx_system.h"
|
| +#include "third_party/base/ptr_util.h"
|
| #include "xfa/fwl/core/cfwl_event.h"
|
| #include "xfa/fwl/core/cfwl_themepart.h"
|
| #include "xfa/fwl/core/fwl_widgethit.h"
|
| @@ -112,8 +113,13 @@ class IFWL_Widget {
|
| virtual IFWL_ThemeProvider* GetThemeProvider();
|
| virtual FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
|
|
|
| - IFWL_WidgetDelegate* GetCurrentDelegate();
|
| - void SetCurrentDelegate(IFWL_WidgetDelegate* pDelegate);
|
| + IFWL_WidgetDelegate* GetDelegate() const { return m_pDelegate.get(); }
|
| + void SetDelegate(std::unique_ptr<IFWL_WidgetDelegate> delegate) {
|
| + m_pDelegate = std::move(delegate);
|
| + }
|
| + std::unique_ptr<IFWL_WidgetDelegate> ReleaseDelegate() {
|
| + return pdfium::WrapUnique<IFWL_WidgetDelegate>(m_pDelegate.release());
|
| + }
|
|
|
| const IFWL_App* GetOwnerApp() const;
|
|
|
| @@ -201,15 +207,9 @@ class IFWL_Widget {
|
|
|
| FX_BOOL IsParent(IFWL_Widget* pParent);
|
|
|
| - void SetDelegate(std::unique_ptr<IFWL_WidgetDelegate> delegate) {
|
| - m_pDelegate = std::move(delegate);
|
| - }
|
| - IFWL_WidgetDelegate* GetDelegate() const { return m_pDelegate.get(); }
|
| -
|
| const IFWL_App* const m_pOwnerApp;
|
| CFWL_WidgetMgr* const m_pWidgetMgr;
|
| std::unique_ptr<CFWL_WidgetImpProperties> m_pProperties;
|
| - IFWL_WidgetDelegate* m_pCurDelegate; // Not owned.
|
| IFWL_Widget* m_pOuter;
|
| void* m_pLayoutItem;
|
| CFWL_Widget* m_pAssociate;
|
|
|