summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn1
-rw-r--r--xfa/fwl/cfwl_widgetmgr.h10
-rw-r--r--xfa/fwl/ifwl_widgetmgrdelegate.h24
-rw-r--r--xfa/fxfa/cxfa_ffapp.cpp5
-rw-r--r--xfa/fxfa/cxfa_ffapp.h12
-rw-r--r--xfa/fxfa/cxfa_ffcheckbutton.cpp3
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp5
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.cpp3
8 files changed, 15 insertions, 48 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 39a227c600..3c85212120 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1586,7 +1586,6 @@ if (pdf_enable_xfa) {
"xfa/fwl/ifwl_adaptertimermgr.h",
"xfa/fwl/ifwl_themeprovider.h",
"xfa/fwl/ifwl_widgetdelegate.h",
- "xfa/fwl/ifwl_widgetmgrdelegate.h",
"xfa/fwl/theme/cfwl_barcodetp.cpp",
"xfa/fwl/theme/cfwl_barcodetp.h",
"xfa/fwl/theme/cfwl_carettp.cpp",
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 3b26c7155d..9ea2238c4f 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -12,7 +12,6 @@
#include <vector>
#include "core/fxcrt/fx_system.h"
-#include "xfa/fwl/ifwl_widgetmgrdelegate.h"
#include "xfa/fxgraphics/cxfa_graphics.h"
#define FWL_WGTMGR_DisableForm 0x00000002
@@ -24,17 +23,16 @@ class CXFA_Graphics;
class CFX_Matrix;
class CFWL_Widget;
-class CFWL_WidgetMgr : public CFWL_WidgetMgrDelegate {
+class CFWL_WidgetMgr {
public:
explicit CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative);
~CFWL_WidgetMgr();
- // CFWL_WidgetMgrDelegate
- void OnSetCapability(uint32_t dwCapability) override;
- void OnProcessMessageToForm(CFWL_Message* pMessage) override;
+ void OnSetCapability(uint32_t dwCapability);
+ void OnProcessMessageToForm(CFWL_Message* pMessage);
void OnDrawWidget(CFWL_Widget* pWidget,
CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) override;
+ const CFX_Matrix* pMatrix);
CFWL_Widget* GetParentWidget(CFWL_Widget* pWidget) const;
CFWL_Widget* GetOwnerWidget(CFWL_Widget* pWidget) const;
diff --git a/xfa/fwl/ifwl_widgetmgrdelegate.h b/xfa/fwl/ifwl_widgetmgrdelegate.h
deleted file mode 100644
index 46996821c5..0000000000
--- a/xfa/fwl/ifwl_widgetmgrdelegate.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FWL_IFWL_WIDGETMGRDELEGATE_H_
-#define XFA_FWL_IFWL_WIDGETMGRDELEGATE_H_
-
-class CFWL_Message;
-class CXFA_Graphics;
-class CFX_Matrix;
-class CFWL_Widget;
-
-class CFWL_WidgetMgrDelegate {
- public:
- virtual void OnSetCapability(uint32_t dwCapability) = 0;
- virtual void OnProcessMessageToForm(CFWL_Message* pMessage) = 0;
- virtual void OnDrawWidget(CFWL_Widget* pWidget,
- CXFA_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) = 0;
-};
-
-#endif // XFA_FWL_IFWL_WIDGETMGRDELEGATE_H_
diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp
index b766cdc40f..6c14a981db 100644
--- a/xfa/fxfa/cxfa_ffapp.cpp
+++ b/xfa/fxfa/cxfa_ffapp.cpp
@@ -77,12 +77,11 @@ CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() {
return m_pFWLTheme.get();
}
-CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(
- CFWL_WidgetMgrDelegate* pDelegate) {
+CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(CFWL_WidgetMgr* pDelegate) {
if (!m_pAdapterWidgetMgr) {
m_pAdapterWidgetMgr = pdfium::MakeUnique<CXFA_FWLAdapterWidgetMgr>();
pDelegate->OnSetCapability(FWL_WGTMGR_DisableForm);
- m_pWidgetMgrDelegate = pDelegate;
+ m_pWidgetMgr = pDelegate;
}
return m_pAdapterWidgetMgr.get();
}
diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h
index 0da4e79173..80e30d4c7e 100644
--- a/xfa/fxfa/cxfa_ffapp.h
+++ b/xfa/fxfa/cxfa_ffapp.h
@@ -18,13 +18,13 @@
#include "xfa/fwl/cfwl_app.h"
#include "xfa/fxfa/fxfa.h"
+class CFWL_WidgetMgr;
class CXFA_DefFontMgr;
class CXFA_FWLAdapterWidgetMgr;
class CXFA_FWLTheme;
class CXFA_FFDocHandler;
class CXFA_FontMgr;
class IFWL_AdapterTimerMgr;
-class CFWL_WidgetMgrDelegate;
class CXFA_FFApp {
public:
@@ -36,7 +36,7 @@ class CXFA_FFApp {
void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr);
CXFA_FFDocHandler* GetDocHandler();
- CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate);
+ CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgr* pDelegate);
CFGAS_FontMgr* GetFDEFontMgr();
CXFA_FWLTheme* GetFWLTheme();
@@ -44,9 +44,7 @@ class CXFA_FFApp {
const CFWL_App* GetFWLApp() const { return m_pFWLApp.get(); }
IFWL_AdapterTimerMgr* GetTimerMgr() const;
CXFA_FontMgr* GetXFAFontMgr() const;
- CFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() const {
- return m_pWidgetMgrDelegate.Get();
- }
+ CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.Get(); }
void ClearEventTargets();
@@ -77,9 +75,9 @@ class CXFA_FFApp {
std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme;
std::unique_ptr<CFWL_App> m_pFWLApp;
- // |m_pWidgetMgrDelegate| has to be released before |m_pFWLApp|, since
+ // |m_pWidgetMgr| has to be released before |m_pFWLApp|, since
// |m_pFWLApp| is its owner.
- CFX_UnownedPtr<CFWL_WidgetMgrDelegate> m_pWidgetMgrDelegate;
+ CFX_UnownedPtr<CFWL_WidgetMgr> m_pWidgetMgr;
};
#endif // XFA_FXFA_CXFA_FFAPP_H_
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp
index c1dae57df8..65eb17d6d6 100644
--- a/xfa/fxfa/cxfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp
@@ -243,8 +243,7 @@ void CXFA_FFCheckButton::RenderWidget(CXFA_Graphics* pGS,
m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round);
CFX_Matrix mt(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top);
mt.Concat(mtRotate);
- GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget.get(), pGS,
- &mt);
+ GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, &mt);
}
bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 2826589c90..e009ed6caa 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -76,8 +76,7 @@ void CXFA_FFField::RenderWidget(CXFA_Graphics* pGS,
CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect();
CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
- GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget.get(), pGS,
- &mt);
+ GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, &mt);
}
void CXFA_FFField::DrawHighlight(CXFA_Graphics* pGS,
@@ -737,7 +736,7 @@ bool CXFA_FFField::IsDataChanged() {
}
void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) {
- GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage);
+ GetApp()->GetWidgetMgr()->OnProcessMessageToForm(pMessage);
}
void CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) {}
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index a0594c7853..17c1b9f8c8 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -44,8 +44,7 @@ void CXFA_FFPushButton::RenderWidget(CXFA_Graphics* pGS,
CFX_RectF rtWidget = GetRectWithoutRotate();
CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
- GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget.get(), pGS,
- &mt);
+ GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, &mt);
}
bool CXFA_FFPushButton::LoadWidget() {