summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_tooltip.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 14:51:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:51:25 -0700
commit3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch)
tree365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/ifwl_tooltip.cpp
parent4cf551577856f89103e162edc761def44ffb96fc (diff)
downloadpdfium-3b3ce1a242f8445848d3f23d6c35ba01d7c645f4.tar.xz
Merge delegates into IFWL_* classes.
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
Diffstat (limited to 'xfa/fwl/core/ifwl_tooltip.cpp')
-rw-r--r--xfa/fwl/core/ifwl_tooltip.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/xfa/fwl/core/ifwl_tooltip.cpp b/xfa/fwl/core/ifwl_tooltip.cpp
index 371709772e..200cf7adab 100644
--- a/xfa/fwl/core/ifwl_tooltip.cpp
+++ b/xfa/fwl/core/ifwl_tooltip.cpp
@@ -32,8 +32,6 @@ IFWL_ToolTip::IFWL_ToolTip(const IFWL_App* app,
m_rtAnchor.Set(0, 0, 0, 0);
m_pProperties->m_dwStyles &= ~FWL_WGTSTYLE_Child;
m_pProperties->m_dwStyles |= FWL_WGTSTYLE_Popup;
-
- SetDelegate(pdfium::MakeUnique<CFWL_ToolTipImpDelegate>(this));
}
IFWL_ToolTip::~IFWL_ToolTip() {}
@@ -228,6 +226,11 @@ void IFWL_ToolTip::RefreshToolTipPos() {
}
}
+void IFWL_ToolTip::OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
+ DrawWidget(pGraphics, pMatrix);
+}
+
IFWL_ToolTip::Timer::Timer(IFWL_ToolTip* pToolTip) : IFWL_Timer(pToolTip) {}
void IFWL_ToolTip::Timer::Run(IFWL_TimerInfo* pTimerInfo) {
@@ -248,17 +251,3 @@ void IFWL_ToolTip::Timer::Run(IFWL_TimerInfo* pTimerInfo) {
pToolTip->m_pTimerInfoHide = nullptr;
}
}
-
-CFWL_ToolTipImpDelegate::CFWL_ToolTipImpDelegate(IFWL_ToolTip* pOwner)
- : m_pOwner(pOwner) {}
-
-void CFWL_ToolTipImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
- CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
-}
-
-void CFWL_ToolTipImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {}
-
-void CFWL_ToolTipImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- m_pOwner->DrawWidget(pGraphics, pMatrix);
-}