From 1529756d0d62638ea0fc7965416bef717ff47413 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 24 May 2016 09:46:02 -0700 Subject: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr. The pure virtual class isn't buying us anything, and is costing us an otherwise unneeded vtable. Fix pre-existing presubmit warning in fwl_noteimp.cpp:88: If statement had no body and no else clause ... Remove switch on enum() and make separate GetWidget() methods. Review-Url: https://codereview.chromium.org/2004213002 --- xfa/fwl/core/fwl_appimp.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xfa/fwl/core/fwl_appimp.cpp') diff --git a/xfa/fwl/core/fwl_appimp.cpp b/xfa/fwl/core/fwl_appimp.cpp index d7fa8bc1c0..1b90d369b5 100644 --- a/xfa/fwl/core/fwl_appimp.cpp +++ b/xfa/fwl/core/fwl_appimp.cpp @@ -32,7 +32,7 @@ CXFA_FFApp* IFWL_App::GetAdapterNative() { return static_cast(GetImpl())->GetAdapterNative(); } -IFWL_WidgetMgr* IFWL_App::GetWidgetMgr() { +CFWL_WidgetMgr* IFWL_App::GetWidgetMgr() { return static_cast(GetImpl())->GetWidgetMgr(); } @@ -76,10 +76,9 @@ CXFA_FFApp* CFWL_AppImp::GetAdapterNative() const { return m_pAdapterNative; } CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() { - return static_cast(FWL_GetWidgetMgr()) - ->GetAdapterWidgetMgr(); + return CFWL_WidgetMgr::GetInstance()->GetAdapterWidgetMgr(); } -IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const { +CFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const { return m_pWidgetMgr.get(); } -- cgit v1.2.3