Remove unused bImmediately parameter from CXFA_FWLAdapterTimerMgr::Start().
Removes an idiosyncrasy that might prevent folding more redundant
timer classes together down the road. Adjust callers accordingly.
Change-Id: I6ac4e68a82d52863eccd198a3f2f9e115d456966
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58956
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
index 769401e..36c8b03 100644
--- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
+++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
@@ -50,8 +50,7 @@
CXFA_FWLAdapterTimerMgr::~CXFA_FWLAdapterTimerMgr() = default;
CFWL_TimerInfo* CXFA_FWLAdapterTimerMgr::Start(CFWL_Timer* pTimer,
- uint32_t dwElapse,
- bool bImmediately) {
+ uint32_t dwElapse) {
if (!g_TimerArray)
g_TimerArray = new std::vector<std::unique_ptr<CFWL_TimerInfo>>;
diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h
index 3c477b8..f8aaeca 100644
--- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h
+++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h
@@ -19,9 +19,7 @@
explicit CXFA_FWLAdapterTimerMgr(TimerHandlerIface* pTimerHandler);
~CXFA_FWLAdapterTimerMgr() override;
- CFWL_TimerInfo* Start(CFWL_Timer* pTimer,
- uint32_t dwElapse,
- bool bImmediately) override;
+ CFWL_TimerInfo* Start(CFWL_Timer* pTimer, uint32_t dwElapse) override;
void Stop(CFWL_TimerInfo* pTimerInfo) override;
private:
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index 9380f9e..4dfcb02 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -63,7 +63,7 @@
pOldTimerInfo->StopTimer();
}
- m_pTimerInfo = m_pTimer->StartTimer(kBlinkPeriodMs, true);
+ m_pTimerInfo = m_pTimer->StartTimer(kBlinkPeriodMs);
RemoveStates(FWL_WGTSTATE_Invisible);
SetStates(kStateHighlight);
}
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 9c9eec1..dc911f2 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -357,7 +357,7 @@
DoMouseDown(4, m_rtMaxTrack, m_iMaxTrackState, point);
if (!SendEvent())
- m_pTimerInfo = m_Timer.StartTimer(FWL_SCROLLBAR_Elapse, true);
+ m_pTimerInfo = m_Timer.StartTimer(FWL_SCROLLBAR_Elapse);
}
void CFWL_ScrollBar::OnLButtonUp(const CFX_PointF& point) {
@@ -472,5 +472,5 @@
}
if (!pScrollBar->SendEvent())
- pScrollBar->m_pTimerInfo = StartTimer(0, true);
+ pScrollBar->m_pTimerInfo = StartTimer(0);
}
diff --git a/xfa/fwl/cfwl_timer.cpp b/xfa/fwl/cfwl_timer.cpp
index 8e82834..fd35e06 100644
--- a/xfa/fwl/cfwl_timer.cpp
+++ b/xfa/fwl/cfwl_timer.cpp
@@ -15,7 +15,7 @@
CFWL_Timer::~CFWL_Timer() {}
-CFWL_TimerInfo* CFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) {
+CFWL_TimerInfo* CFWL_Timer::StartTimer(uint32_t dwElapse) {
CFWL_App::AdapterIface* pAdapterNative =
m_pWidget->GetOwnerApp()->GetAdapterNative();
if (!pAdapterNative)
@@ -27,5 +27,5 @@
if (!m_pAdapterTimerMgr)
return nullptr;
- return m_pAdapterTimerMgr->Start(this, dwElapse, bImmediately);
+ return m_pAdapterTimerMgr->Start(this, dwElapse);
}
diff --git a/xfa/fwl/cfwl_timer.h b/xfa/fwl/cfwl_timer.h
index 586c2f3..49a1328 100644
--- a/xfa/fwl/cfwl_timer.h
+++ b/xfa/fwl/cfwl_timer.h
@@ -22,7 +22,7 @@
virtual ~CFWL_Timer();
virtual void Run(CFWL_TimerInfo* hTimer) = 0;
- CFWL_TimerInfo* StartTimer(uint32_t dwElapse, bool bImmediately);
+ CFWL_TimerInfo* StartTimer(uint32_t dwElapse);
protected:
UnownedPtr<CFWL_Widget> m_pWidget;
diff --git a/xfa/fwl/ifwl_adaptertimermgr.h b/xfa/fwl/ifwl_adaptertimermgr.h
index afa87c4..106de53 100644
--- a/xfa/fwl/ifwl_adaptertimermgr.h
+++ b/xfa/fwl/ifwl_adaptertimermgr.h
@@ -13,9 +13,7 @@
public:
virtual ~IFWL_AdapterTimerMgr() = default;
- virtual CFWL_TimerInfo* Start(CFWL_Timer* pTimer,
- uint32_t dwElapse,
- bool bImmediately) = 0;
+ virtual CFWL_TimerInfo* Start(CFWL_Timer* pTimer, uint32_t dwElapse) = 0;
virtual void Stop(CFWL_TimerInfo* pTimerInfo) = 0;
};