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

Unified Diff: fpdfsdk/javascript/JS_Object.h

Issue 2221513002: Remove another potential stale CJS_Timer usage (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: tidy pdf Created 4 years, 4 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
« no previous file with comments | « fpdfsdk/fpdfformfill_embeddertest.cpp ('k') | fpdfsdk/javascript/JS_Object.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Object.h
diff --git a/fpdfsdk/javascript/JS_Object.h b/fpdfsdk/javascript/JS_Object.h
index 146a7c93b57105b1060940963d174dfd1f57bd22..aec94c0362020f7b1a6bb29d462a3d4d2cd4bba2 100644
--- a/fpdfsdk/javascript/JS_Object.h
+++ b/fpdfsdk/javascript/JS_Object.h
@@ -18,12 +18,14 @@ class CJS_Context;
class CJS_Object;
class CJS_Timer;
class CPDFDoc_Environment;
+
class CJS_EmbedObj {
public:
explicit CJS_EmbedObj(CJS_Object* pJSObject);
virtual ~CJS_EmbedObj();
virtual void TimerProc(CJS_Timer* pTimer) {}
+ virtual void CancelProc(CJS_Timer* pTimer) {}
CJS_Object* GetJSObject() const { return m_pJSObject; }
@@ -76,15 +78,15 @@ class CJS_Timer : public CJS_Runtime::Observer {
uint32_t dwTimeOut);
~CJS_Timer() override;
- void KillJSTimer();
+ static void Trigger(int nTimerID);
+ static void Cancel(int nTimerID);
- int GetType() const { return m_nType; }
+ bool IsOneShot() const { return m_nType == 1; }
uint32_t GetTimeOut() const { return m_dwTimeOut; }
+ int GetTimerID() const { return m_nTimerID; }
CJS_Runtime* GetRuntime() const { return m_bValid ? m_pRuntime : nullptr; }
CFX_WideString GetJScript() const { return m_swJScript; }
- static void TimerProc(int idEvent);
-
private:
using TimerMap = std::map<FX_UINT, CJS_Timer*>;
static TimerMap* GetGlobalTimerMap();
« no previous file with comments | « fpdfsdk/fpdfformfill_embeddertest.cpp ('k') | fpdfsdk/javascript/JS_Object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698