From c0858354f1e9ce1246b8af9ef2cd11623a1132dd Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 30 Oct 2017 17:49:52 +0000 Subject: Rename app to cjs_app This CL renames the app.{cpp|h} files to cjs_app.{cpp|h}. The CJS_TimerObj and GlobalTimer objects have been moved to their own files. Change-Id: I7a4063b212f1051b1517ec8902a0ee215854feaf Reviewed-on: https://pdfium-review.googlesource.com/17040 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fpdfsdk/javascript/cjs_timerobj.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 fpdfsdk/javascript/cjs_timerobj.cpp (limited to 'fpdfsdk/javascript/cjs_timerobj.cpp') diff --git a/fpdfsdk/javascript/cjs_timerobj.cpp b/fpdfsdk/javascript/cjs_timerobj.cpp new file mode 100644 index 0000000000..f0b90292c6 --- /dev/null +++ b/fpdfsdk/javascript/cjs_timerobj.cpp @@ -0,0 +1,32 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "fpdfsdk/javascript/cjs_timerobj.h" + +#include "fpdfsdk/javascript/global_timer.h" + +int CJS_TimerObj::ObjDefnID = -1; + +// static +int CJS_TimerObj::GetObjDefnID() { + return ObjDefnID; +} + +// static +void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("TimerObj", FXJSOBJTYPE_DYNAMIC, + JSConstructor, + JSDestructor); +} + +TimerObj::TimerObj(CJS_Object* pJSObject) + : CJS_EmbedObj(pJSObject), m_nTimerID(0) {} + +TimerObj::~TimerObj() {} + +void TimerObj::SetTimer(GlobalTimer* pTimer) { + m_nTimerID = pTimer->GetTimerID(); +} -- cgit v1.2.3