From abdf7e101fbfbe4a19aa7e5d6519891126c7cb21 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 1 Jun 2018 18:19:23 +0000 Subject: Rename CPDFXFA_Context::GetTimerMgr() to NewTimerMgr() Because it returns an unique_ptr to a newly-created object. Also rename m_pTimeMgrAdapter to m_pAdapterTimerMgr, because in English, adjectives come first, and this is a TimerMgr obtained from an Adatper, not an Adapter for a TimerMgr. Also change TimeMgr to TimerMgr since the manager manages timers, not time itself. Follow-on from https://pdfium-review.googlesource.com/c/pdfium/+/33230 No functional change. Change-Id: I08d2b6cd8cc816f38326e87ee46060f091c74fdf Reviewed-on: https://pdfium-review.googlesource.com/33570 Reviewed-by: Ryan Harrison Commit-Queue: Ryan Harrison --- fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 2 +- fpdfsdk/fpdfxfa/cpdfxfa_context.h | 2 +- xfa/fwl/cfwl_timer.cpp | 8 ++++---- xfa/fwl/cfwl_timer.h | 2 +- xfa/fxfa/cxfa_ffapp.cpp | 4 ++-- xfa/fxfa/cxfa_ffapp.h | 2 +- xfa/fxfa/fxfa.h | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 446a77ea96..385bbe7074 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -341,7 +341,7 @@ bool CPDFXFA_Context::PutRequestURL(const WideString& wsURL, m_pFormFillEnv->PutRequestURL(wsURL, wsData, wsEncode); } -std::unique_ptr CPDFXFA_Context::GetTimerMgr() { +std::unique_ptr CPDFXFA_Context::NewTimerMgr() { if (!m_pFormFillEnv) return nullptr; return pdfium::MakeUnique(m_pFormFillEnv.Get()); diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index 6458926a68..54b2cac349 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -91,7 +91,7 @@ class CPDFXFA_Context : public CPDF_Document::Extension, const WideString& wsData, const WideString& wsEncode) override; - std::unique_ptr GetTimerMgr() override; + std::unique_ptr NewTimerMgr() override; protected: friend class CPDFXFA_DocEnvironment; diff --git a/xfa/fwl/cfwl_timer.cpp b/xfa/fwl/cfwl_timer.cpp index 07d8461b9f..b7c54fdab1 100644 --- a/xfa/fwl/cfwl_timer.cpp +++ b/xfa/fwl/cfwl_timer.cpp @@ -25,13 +25,13 @@ CFWL_TimerInfo* CFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) { if (!pAdapterNative) return nullptr; - if (!m_pTimeMgrAdapter) - m_pTimeMgrAdapter = pAdapterNative->GetTimerMgr(); + if (!m_pAdapterTimerMgr) + m_pAdapterTimerMgr = pAdapterNative->NewTimerMgr(); - if (!m_pTimeMgrAdapter) + if (!m_pAdapterTimerMgr) return nullptr; CFWL_TimerInfo* pTimerInfo = nullptr; - m_pTimeMgrAdapter->Start(this, dwElapse, bImmediately, &pTimerInfo); + m_pAdapterTimerMgr->Start(this, dwElapse, bImmediately, &pTimerInfo); return pTimerInfo; } diff --git a/xfa/fwl/cfwl_timer.h b/xfa/fwl/cfwl_timer.h index 355ea69d67..586c2f3e40 100644 --- a/xfa/fwl/cfwl_timer.h +++ b/xfa/fwl/cfwl_timer.h @@ -26,7 +26,7 @@ class CFWL_Timer { protected: UnownedPtr m_pWidget; - std::unique_ptr m_pTimeMgrAdapter; + std::unique_ptr m_pAdapterTimerMgr; }; #endif // XFA_FWL_CFWL_TIMER_H_ diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp index f6d6bdd6b5..21b2eddbb4 100644 --- a/xfa/fxfa/cxfa_ffapp.cpp +++ b/xfa/fxfa/cxfa_ffapp.cpp @@ -67,8 +67,8 @@ CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetFWLAdapterWidgetMgr() { return m_pAdapterWidgetMgr.get(); } -std::unique_ptr CXFA_FFApp::GetTimerMgr() const { - return m_pProvider->GetTimerMgr(); +std::unique_ptr CXFA_FFApp::NewTimerMgr() const { + return m_pProvider->NewTimerMgr(); } void CXFA_FFApp::ClearEventTargets() { diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h index acc3bf0783..20db6e06a3 100644 --- a/xfa/fxfa/cxfa_ffapp.h +++ b/xfa/fxfa/cxfa_ffapp.h @@ -45,7 +45,7 @@ class CXFA_FFApp { IXFA_AppProvider* GetAppProvider() const { return m_pProvider.Get(); } const CFWL_App* GetFWLApp() const { return m_pFWLApp.get(); } CXFA_FontMgr* GetXFAFontMgr() { return &m_pFontMgr; } - std::unique_ptr GetTimerMgr() const; + std::unique_ptr NewTimerMgr() const; void ClearEventTargets(); diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h index 59c8c08de8..1b0c76f584 100644 --- a/xfa/fxfa/fxfa.h +++ b/xfa/fxfa/fxfa.h @@ -202,7 +202,7 @@ class IXFA_AppProvider { const WideString& wsData, const WideString& wsEncode) = 0; - virtual std::unique_ptr GetTimerMgr() = 0; + virtual std::unique_ptr NewTimerMgr() = 0; }; class IXFA_DocEnvironment { -- cgit v1.2.3