From 55fa356c8ce72c597e75fc591fc67597b1c019d5 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 4 May 2016 14:24:53 -0700 Subject: Cleanup IFWL_Adapter interfaces. This CL removes: * IFWL_AdapterNative * IFWL_Adapter{Widget|Thread}Mgr * IFWL_WidgetMgrDelegate * CFWL_SDAdapter{Widget|Thread}Mgr Methods which just returned have also been removed. Review-Url: https://codereview.chromium.org/1928963004 --- xfa/fwl/core/fwl_noteimp.cpp | 70 ++++++++------------------------------------ 1 file changed, 13 insertions(+), 57 deletions(-) (limited to 'xfa/fwl/core/fwl_noteimp.cpp') diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index d73a49fa90..5d439d7f0c 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -14,7 +14,6 @@ #include "xfa/fwl/core/fwl_formimp.h" #include "xfa/fwl/core/fwl_widgetimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" -#include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_tooltiptarget.h" @@ -46,11 +45,6 @@ FX_BOOL CFWL_NoteLoop::ContinueModal() { } FWL_ERR CFWL_NoteLoop::EndModalLoop() { m_bContinueModal = FALSE; -#if (_FX_OS_ == _FX_MACOSX_) - CFWL_WidgetMgr* pWidgetMgr = static_cast(FWL_GetWidgetMgr()); - IFWL_AdapterWidgetMgr* adapterWidgetMgr = pWidgetMgr->GetAdapterWidgetMgr(); - adapterWidgetMgr->EndLoop(); -#endif return FWL_ERR_Succeeded; } @@ -213,60 +207,22 @@ FWL_ERR CFWL_NoteDriver::Run() { CFWL_WidgetMgr* pWidgetMgr = static_cast(FWL_GetWidgetMgr()); if (!pWidgetMgr) return FWL_ERR_Indefinite; -#if (_FX_OS_ == _FX_MACOSX_) - IFWL_AdapterWidgetMgr* adapterWidgetMgr = pWidgetMgr->GetAdapterWidgetMgr(); - CFWL_NoteLoop* pTopLoop = GetTopLoop(); - if (pTopLoop) { - CFWL_WidgetImp* formImp = pTopLoop->GetForm(); - if (formImp) { - IFWL_Widget* pForm = formImp->GetInterface(); - adapterWidgetMgr->RunLoop(pForm); - } - } -#elif(_FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_) - FX_BOOL bIdle = TRUE; - int32_t iIdleCount = 0; - CFWL_NoteLoop* pTopLoop = NULL; - for (;;) { - pTopLoop = GetTopLoop(); - if (!pTopLoop || !pTopLoop->ContinueModal()) { - break; - } - if (UnqueueMessage(pTopLoop)) { - continue; - } - while (bIdle && !(pWidgetMgr->CheckMessage_Native())) { - if (FWL_ERR_Indefinite == pTopLoop->Idle(iIdleCount++)) { - bIdle = FALSE; - } - } - do { - if (FWL_ERR_Indefinite == pWidgetMgr->DispatchMessage_Native()) { - break; - } - if (pWidgetMgr->IsIdleMessage_Native()) { - bIdle = TRUE; - iIdleCount = 0; - } - } while (pWidgetMgr->CheckMessage_Native()); - } -#elif(_FX_OS_ == _FX_LINUX_DESKTOP_) - CFWL_NoteLoop* pTopLoop = NULL; - for (;;) { - pTopLoop = GetTopLoop(); - if (!pTopLoop || !pTopLoop->ContinueModal()) { - break; - } - if (UnqueueMessage(pTopLoop)) { - continue; - } - if (pWidgetMgr->CheckMessage_Native()) { - pWidgetMgr->DispatchMessage_Native(); - } - } + +#if (_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_WIN32_DESKTOP_ || \ + _FX_OS_ == _FX_WIN64_) + CFWL_NoteLoop* pTopLoop = NULL; + for (;;) { + pTopLoop = GetTopLoop(); + if (!pTopLoop || !pTopLoop->ContinueModal()) + break; + if (UnqueueMessage(pTopLoop)) + continue; + } #endif + return FWL_ERR_Succeeded; } + IFWL_Widget* CFWL_NoteDriver::GetFocus() { return m_pFocus; } -- cgit v1.2.3