diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-02 14:51:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-02 14:51:25 -0700 |
commit | 3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch) | |
tree | 365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/ifwl_caret.cpp | |
parent | 4cf551577856f89103e162edc761def44ffb96fc (diff) | |
download | pdfium-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_caret.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_caret.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp index 2dd1866642..94b56e8cf9 100644 --- a/xfa/fwl/core/ifwl_caret.cpp +++ b/xfa/fwl/core/ifwl_caret.cpp @@ -22,7 +22,6 @@ IFWL_Caret::IFWL_Caret(const IFWL_App* app, m_dwElapse(400), m_bSetColor(FALSE) { SetStates(FWL_STATE_CAT_HightLight); - SetDelegate(pdfium::MakeUnique<CFWL_CaretImpDelegate>(this)); } IFWL_Caret::~IFWL_Caret() { @@ -99,6 +98,13 @@ void IFWL_Caret::DrawCaretBK(CFX_Graphics* pGraphics, pTheme->DrawBackground(¶m); } +void IFWL_Caret::OnProcessMessage(CFWL_Message* pMessage) {} + +void IFWL_Caret::OnDrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix) { + DrawWidget(pGraphics, pMatrix); +} + IFWL_Caret::Timer::Timer(IFWL_Caret* pCaret) : IFWL_Timer(pCaret) {} void IFWL_Caret::Timer::Run(IFWL_TimerInfo* pTimerInfo) { @@ -111,13 +117,3 @@ void IFWL_Caret::Timer::Run(IFWL_TimerInfo* pTimerInfo) { rt.Set(0, 0, rt.width + 1, rt.height); pCaret->Repaint(&rt); } - -CFWL_CaretImpDelegate::CFWL_CaretImpDelegate(IFWL_Caret* pOwner) - : m_pOwner(pOwner) {} - -void CFWL_CaretImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {} - -void CFWL_CaretImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, - const CFX_Matrix* pMatrix) { - m_pOwner->DrawWidget(pGraphics, pMatrix); -} |