Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp

Issue 2037573003: Remove FWL_HTIMER in favor of IWFL_TimerInfo (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove unused return value. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
index 9ac9c311603165928584b5b278ed126140fb137f..2b9bb4aab037fb3c64f06dff7070b72d60e6faa7 100644
--- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
+++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
@@ -48,8 +48,8 @@ CFWL_ToolTipImp::CFWL_ToolTipImp(const CFWL_WidgetImpProperties& properties,
m_bBtnDown(FALSE),
m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
m_iTTOAlign(FDE_TTOALIGNMENT_Center),
- m_hTimerShow(NULL),
- m_hTimerHide(NULL),
+ m_pTimerInfoShow(NULL),
+ m_pTimerInfoHide(NULL),
dsinclair 2016/06/06 19:52:23 nit: nullptr
Tom Sepez 2016/06/06 20:08:33 Done.
m_pTimer(NULL) {
m_rtClient.Set(0, 0, 0, 0);
m_rtCaption.Set(0, 0, 0, 0);
@@ -221,18 +221,18 @@ void CFWL_ToolTipImp::Show() {
static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider);
int32_t nInitDelay = pData->GetInitialDelay(m_pInterface);
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible))
- m_hTimerShow = FWL_StartTimer(&m_TimerShow, nInitDelay, FALSE);
+ m_pTimerInfoShow = m_TimerShow.StartTimer(nInitDelay, false);
}
void CFWL_ToolTipImp::Hide() {
SetStates(FWL_WGTSTATE_Invisible, TRUE);
- if (m_hTimerHide) {
- FWL_StopTimer(m_hTimerHide);
- m_hTimerHide = nullptr;
+ if (m_pTimerInfoHide) {
+ m_pTimerInfoHide->StopTimer();
+ m_pTimerInfoHide = nullptr;
}
- if (m_hTimerShow) {
- FWL_StopTimer(m_hTimerShow);
- m_hTimerShow = nullptr;
+ if (m_pTimerInfoShow) {
+ m_pTimerInfoShow->StopTimer();
+ m_pTimerInfoShow = nullptr;
}
}
@@ -241,7 +241,7 @@ void CFWL_ToolTipImp::SetStates(uint32_t dwStates, FX_BOOL bSet) {
IFWL_ToolTipDP* pData =
static_cast<IFWL_ToolTipDP*>(m_pProperties->m_pDataProvider);
int32_t nAutoPopDelay = pData->GetAutoPopDelay(m_pInterface);
- m_hTimerHide = FWL_StartTimer(&m_TimerHide, nAutoPopDelay, FALSE);
+ m_pTimerInfoHide = m_TimerHide.StartTimer(nAutoPopDelay, false);
}
CFWL_WidgetImp::SetStates(dwStates, bSet);
}
@@ -276,23 +276,24 @@ void CFWL_ToolTipImp::RefreshToolTipPos() {
}
CFWL_ToolTipImp::CFWL_ToolTipTimer::CFWL_ToolTipTimer(CFWL_ToolTipImp* pToolTip)
: m_pToolTip(pToolTip) {}
-int32_t CFWL_ToolTipImp::CFWL_ToolTipTimer::Run(FWL_HTIMER hTimer) {
- if (m_pToolTip->m_hTimerShow == hTimer && m_pToolTip->m_hTimerShow) {
+
+void CFWL_ToolTipImp::CFWL_ToolTipTimer::Run(IFWL_TimerInfo* pTimerInfo) {
+ if (m_pToolTip->m_pTimerInfoShow == pTimerInfo &&
+ m_pToolTip->m_pTimerInfoShow) {
if (m_pToolTip->GetStates() & FWL_WGTSTATE_Invisible) {
m_pToolTip->SetStates(FWL_WGTSTATE_Invisible, FALSE);
m_pToolTip->RefreshToolTipPos();
- FWL_StopTimer(m_pToolTip->m_hTimerShow);
- m_pToolTip->m_hTimerShow = NULL;
- return TRUE;
+ m_pToolTip->m_pTimerInfoShow->StopTimer();
+ m_pToolTip->m_pTimerInfoShow = nullptr;
+ return;
}
}
- if (m_pToolTip->m_hTimerHide == hTimer && m_pToolTip->m_hTimerHide) {
+ if (m_pToolTip->m_pTimerInfoHide == pTimerInfo &&
+ m_pToolTip->m_pTimerInfoHide) {
m_pToolTip->SetStates(FWL_WGTSTATE_Invisible, TRUE);
- FWL_StopTimer(m_pToolTip->m_hTimerHide);
- m_pToolTip->m_hTimerHide = NULL;
- return TRUE;
+ m_pToolTip->m_pTimerInfoHide->StopTimer();
+ m_pToolTip->m_pTimerInfoHide = nullptr;
}
- return TRUE;
}
CFWL_ToolTipImpDelegate::CFWL_ToolTipImpDelegate(CFWL_ToolTipImp* pOwner)

Powered by Google App Engine
This is Rietveld 408576698