summaryrefslogtreecommitdiff
path: root/xfa/fxfa
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/fxfa
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/fxfa')
-rw-r--r--xfa/fxfa/app/xfa_ffapp.cpp12
-rw-r--r--xfa/fxfa/app/xfa_fffield.h1
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.h23
-rw-r--r--xfa/fxfa/include/xfa_ffapp.h16
5 files changed, 27 insertions, 29 deletions
diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp
index de63dc4934..7f19b26440 100644
--- a/xfa/fxfa/app/xfa_ffapp.cpp
+++ b/xfa/fxfa/app/xfa_ffapp.cpp
@@ -73,8 +73,7 @@ CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider)
#endif
m_pAdapterWidgetMgr(nullptr),
m_pWidgetMgrDelegate(nullptr),
- m_pFDEFontMgr(nullptr),
- m_pAdapterThreadMgr(nullptr) {
+ m_pFDEFontMgr(nullptr) {
m_pFWLApp = IFWL_App::Create(this);
FWL_SetApp(m_pFWLApp);
m_pFWLApp->Initialize();
@@ -90,7 +89,6 @@ CXFA_FFApp::~CXFA_FFApp() {
if (m_pFWLTheme)
m_pFWLTheme->Release();
delete m_pAdapterWidgetMgr;
- delete m_pAdapterThreadMgr;
CXFA_TimeZoneProvider::Destroy();
delete m_pFontMgr;
@@ -159,7 +157,7 @@ CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() {
}
return m_pFWLTheme;
}
-IFWL_AdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(
+CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(
CFWL_WidgetMgrDelegate* pDelegate) {
if (!m_pAdapterWidgetMgr) {
m_pAdapterWidgetMgr = new CXFA_FWLAdapterWidgetMgr;
@@ -169,12 +167,6 @@ IFWL_AdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(
}
return m_pAdapterWidgetMgr;
}
-IFWL_AdapterThreadMgr* CXFA_FFApp::GetThreadMgr() {
- if (!m_pAdapterThreadMgr) {
- m_pAdapterThreadMgr = new CFWL_SDAdapterThreadMgr;
- }
- return m_pAdapterThreadMgr;
-}
IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() {
return m_pProvider->GetTimerMgr();
}
diff --git a/xfa/fxfa/app/xfa_fffield.h b/xfa/fxfa/app/xfa_fffield.h
index 576b0b105e..91908e3b98 100644
--- a/xfa/fxfa/app/xfa_fffield.h
+++ b/xfa/fxfa/app/xfa_fffield.h
@@ -7,7 +7,6 @@
#ifndef XFA_FXFA_APP_XFA_FFFIELD_H_
#define XFA_FXFA_APP_XFA_FFFIELD_H_
-#include "xfa/fwl/core/fwl_sdadapterimp.h"
#include "xfa/fwl/core/ifwl_widgetdelegate.h"
#include "xfa/fwl/lightwidget/cfwl_widget.h"
#include "xfa/fxfa/include/xfa_ffpageview.h"
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 5821a729eb..564d479d73 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -9,6 +9,10 @@
#include "xfa/fxfa/app/xfa_fffield.h"
#include "xfa/fxfa/include/xfa_ffdoc.h"
+CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() {}
+
+CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() {}
+
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
const CFX_RectF* pRect) {
if (!pWidget)
diff --git a/xfa/fxfa/app/xfa_fwladapter.h b/xfa/fxfa/app/xfa_fwladapter.h
index c42ae7402b..7d2241668b 100644
--- a/xfa/fxfa/app/xfa_fwladapter.h
+++ b/xfa/fxfa/app/xfa_fwladapter.h
@@ -7,16 +7,23 @@
#ifndef XFA_FXFA_APP_XFA_FWLADAPTER_H_
#define XFA_FXFA_APP_XFA_FWLADAPTER_H_
-#include "xfa/fwl/core/fwl_sdadapterimp.h"
+#include "core/fxcrt/include/fx_coordinates.h"
+#include "core/fxcrt/include/fx_system.h"
+#include "xfa/fwl/core/fwl_error.h"
-class CXFA_FWLAdapterWidgetMgr : public CFWL_SDAdapterWidgetMgr {
+class IFWL_Widget;
+
+class CXFA_FWLAdapterWidgetMgr {
public:
- virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect);
- virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup);
+ CXFA_FWLAdapterWidgetMgr();
+ ~CXFA_FWLAdapterWidgetMgr();
+
+ FWL_ERR RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect);
+ FX_BOOL GetPopupPos(IFWL_Widget* pWidget,
+ FX_FLOAT fMinHeight,
+ FX_FLOAT fMaxHeight,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup);
};
#endif // XFA_FXFA_APP_XFA_FWLADAPTER_H_
diff --git a/xfa/fxfa/include/xfa_ffapp.h b/xfa/fxfa/include/xfa_ffapp.h
index 774bebb06d..c8df27da5b 100644
--- a/xfa/fxfa/include/xfa_ffapp.h
+++ b/xfa/fxfa/include/xfa_ffapp.h
@@ -10,16 +10,16 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h"
#include "xfa/fgas/font/fgas_font.h"
-#include "xfa/fwl/core/fwl_sdadapterimp.h"
-#include "xfa/fwl/core/ifwl_adapternative.h"
#include "xfa/fwl/core/ifwl_app.h"
#include "xfa/fxfa/include/fxfa.h"
+class CFWL_WidgetMgrDelegate;
class CXFA_DefFontMgr;
class CXFA_FWLAdapterWidgetMgr;
class CXFA_FWLTheme;
class CXFA_FFDocHandler;
class CXFA_FontMgr;
+class IFWL_AdapterTimerMgr;
class CXFA_FileRead : public IFX_FileRead {
public:
@@ -34,10 +34,10 @@ class CXFA_FileRead : public IFX_FileRead {
CFX_ObjectArray<CPDF_StreamAcc> m_Data;
};
-class CXFA_FFApp : public IFWL_AdapterNative {
+class CXFA_FFApp {
public:
CXFA_FFApp(IXFA_AppProvider* pProvider);
- ~CXFA_FFApp() override;
+ ~CXFA_FFApp();
CXFA_FFDocHandler* GetDocHandler();
CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider,
@@ -47,11 +47,8 @@ class CXFA_FFApp : public IFWL_AdapterNative {
IXFA_AppProvider* GetAppProvider() { return m_pProvider; }
void SetDefaultFontMgr(CXFA_DefFontMgr* pFontMgr);
- // IFWL_AdapterNative:
- IFWL_AdapterWidgetMgr* GetWidgetMgr(
- CFWL_WidgetMgrDelegate* pDelegate) override;
- IFWL_AdapterThreadMgr* GetThreadMgr() override;
- IFWL_AdapterTimerMgr* GetTimerMgr() override;
+ CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate);
+ IFWL_AdapterTimerMgr* GetTimerMgr();
CXFA_FontMgr* GetXFAFontMgr();
IFX_FontMgr* GetFDEFontMgr();
@@ -72,7 +69,6 @@ class CXFA_FFApp : public IFWL_AdapterNative {
CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr;
CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate;
IFX_FontMgr* m_pFDEFontMgr;
- CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr;
};
#endif // XFA_FXFA_INCLUDE_XFA_FFAPP_H_