diff options
author | tsepez <tsepez@chromium.org> | 2016-08-08 11:58:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-08 11:58:47 -0700 |
commit | e3ff76b11ac6fcd0d0196ef83946d2321ab8e9bf (patch) | |
tree | 0665080bf665e3a1131107d242b01e137cd52c52 /fpdfsdk/javascript/app.h | |
parent | b1b8668ef12ae4e7fcb5fbf3f01fa623a319a092 (diff) | |
download | pdfium-e3ff76b11ac6fcd0d0196ef83946d2321ab8e9bf.tar.xz |
Rename CJS_Timer to GlobalTimer and make private to app.cpp
The CJS_Timer is fairly far removed from JS itself, the
wrapper objects are CJS_TimerObj and TimerObj. Make it
sound less like them.
Having moved the code to app.cpp, the GlobalTimer can now
refer directly to the app, rather than its superclass of
CJS_EmbedObj. Hence we can pull some app-only timer
related methods out of the superclass.
Review-Url: https://codereview.chromium.org/2222043002
Diffstat (limited to 'fpdfsdk/javascript/app.h')
-rw-r--r-- | fpdfsdk/javascript/app.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/app.h b/fpdfsdk/javascript/app.h index bb083cedb4..52dfd2f9ca 100644 --- a/fpdfsdk/javascript/app.h +++ b/fpdfsdk/javascript/app.h @@ -13,18 +13,18 @@ #include "fpdfsdk/javascript/JS_Define.h" class CJS_Runtime; -class CJS_Timer; +class GlobalTimer; class TimerObj : public CJS_EmbedObj { public: TimerObj(CJS_Object* pJSObject); ~TimerObj() override; - void SetTimer(CJS_Timer* pTimer); + void SetTimer(GlobalTimer* pTimer); int GetTimerID() const { return m_nTimerID; } private: - int m_nTimerID; // Weak reference to timer through global map. + int m_nTimerID; // Weak reference to GlobalTimer through global map. }; class CJS_TimerObj : public CJS_Object { @@ -152,19 +152,20 @@ class app : public CJS_EmbedObj { CJS_Value& vRet, CFX_WideString& sError); + void TimerProc(GlobalTimer* pTimer); + void CancelProc(GlobalTimer* pTimer); + static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath); private: // CJS_EmbedObj - void TimerProc(CJS_Timer* pTimer) override; - void CancelProc(CJS_Timer* pTimer) override; void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript); void ClearTimerCommon(const CJS_Value& param); bool m_bCalculate; bool m_bRuntimeHighLight; - std::vector<std::unique_ptr<CJS_Timer>> m_Timers; + std::vector<std::unique_ptr<GlobalTimer>> m_Timers; }; class CJS_App : public CJS_Object { |