summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/fwl_noteimp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-04 14:24:53 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 14:24:53 -0700
commit55fa356c8ce72c597e75fc591fc67597b1c019d5 (patch)
tree14495a8fc3c21726c970069a696614d95bd11f6d /xfa/fwl/core/fwl_noteimp.cpp
parentb7675f63684ebff68c688a1c7b160596b6747c3e (diff)
downloadpdfium-55fa356c8ce72c597e75fc591fc67597b1c019d5.tar.xz
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
Diffstat (limited to 'xfa/fwl/core/fwl_noteimp.cpp')
-rw-r--r--xfa/fwl/core/fwl_noteimp.cpp70
1 files changed, 13 insertions, 57 deletions
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<CFWL_WidgetMgr*>(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<CFWL_WidgetMgr*>(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;
}