summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Object.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-02-05 15:52:15 -0800
committerTom Sepez <tsepez@chromium.org>2015-02-05 15:52:15 -0800
commite3dbe4db199586bee83f7db3ace142d4c71d0a18 (patch)
tree5b903a9de317429b99d35cb41a1640570fb9b5fc /fpdfsdk/include/javascript/JS_Object.h
parent219b3dab7e184bf8742f61527e37053b04903ff0 (diff)
downloadpdfium-e3dbe4db199586bee83f7db3ace142d4c71d0a18.tar.xz
Merge to master: Kill off some dodgy JS callbacks
Note that this work was done opposite the usual branch order, because I didn't want to kill things in master that turned out to be in use in XFA. Original Review URL: https://codereview.chromium.org/883393007 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/903893002
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Object.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index 2351b096f3..dbf7da68a4 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -1,7 +1,7 @@
// Copyright 2014 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
#ifndef _JS_OBJECT_H_
@@ -28,10 +28,8 @@ public:
CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0);
void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
- FX_BOOL IsSafeMode(IFXJS_Context* cc);
protected:
-
CJS_Object* m_pJSObject;
};
@@ -40,7 +38,7 @@ class CJS_Object : public CFX_Object
public:
CJS_Object(JSFXObject pObject);
virtual ~CJS_Object(void);
-
+
void MakeWeak();
virtual FX_BOOL IsType(FX_LPCSTR sClassName){return TRUE;};
@@ -141,9 +139,9 @@ public:
}
int Find(FX_UINT nIndex)
- {
+ {
for (int i=0,sz=m_Array.GetSize(); i<sz; i++)
- {
+ {
if (JS_TIMER_MAP * pMap = m_Array.GetAt(i))
{
if (pMap->nID == nIndex)
@@ -165,8 +163,8 @@ class CJS_Timer
{
public:
CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp):
- m_nTimerID(0),
- m_pEmbedObj(pObj),
+ m_nTimerID(0),
+ m_pEmbedObj(pObj),
m_bProcessing(FALSE),
m_dwStartTime(0),
m_dwTimeOut(0),
@@ -176,7 +174,7 @@ public:
m_pApp(pApp)
{
}
-
+
virtual ~CJS_Timer()
{
KillJSTimer();
@@ -184,7 +182,7 @@ public:
public:
FX_UINT SetJSTimer(FX_UINT nElapse)
- {
+ {
if (m_nTimerID)KillJSTimer();
IFX_SystemHandler* pHandler = m_pApp->GetSysHandler();
m_nTimerID = pHandler->SetTimer(nElapse,TimerProc);
@@ -238,7 +236,7 @@ public:
{
m_pRuntime = pRuntime;
}
-
+
CJS_Runtime* GetRuntime() const
{
return m_pRuntime;
@@ -272,7 +270,7 @@ public:
};
private:
- FX_UINT m_nTimerID;
+ FX_UINT m_nTimerID;
CJS_EmbedObj* m_pEmbedObj;
FX_BOOL m_bProcessing;