OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _JS_RUNTIME_H_ | 7 #ifndef _JS_RUNTIME_H_ |
8 #define _JS_RUNTIME_H_ | 8 #define _JS_RUNTIME_H_ |
9 | 9 |
10 class CJS_FieldEvent | 10 class CJS_FieldEvent |
(...skipping 10 matching lines...) Expand all Loading... |
21 CJS_Runtime(CPDFDoc_Environment * pApp); | 21 CJS_Runtime(CPDFDoc_Environment * pApp); |
22 virtual ~CJS_Runtime(); | 22 virtual ~CJS_Runtime(); |
23 | 23 |
24 virtual IFXJS_Context * NewContext(); | 24 virtual IFXJS_Context * NewContext(); |
25 virtual void ReleaseC
ontext(IFXJS_Context * pContext); | 25 virtual void ReleaseC
ontext(IFXJS_Context * pContext); |
26 virtual IFXJS_Context* GetCurrentContex
t(); | 26 virtual IFXJS_Context* GetCurrentContex
t(); |
27 | 27 |
28 virtual void SetReade
rDocument(CPDFSDK_Document *pReaderDoc); | 28 virtual void SetReade
rDocument(CPDFSDK_Document *pReaderDoc); |
29 virtual CPDFSDK_Document * GetReaderDocumen
t(){return m_pDocument;} | 29 virtual CPDFSDK_Document * GetReaderDocumen
t(){return m_pDocument;} |
30 | 30 |
31 virtual void GetObjec
tNames(CFX_WideStringArray& array); | |
32 virtual void GetObjec
tConsts(const CFX_WideString& swObjName, CFX_WideStringArray& array); | |
33 virtual void GetObjec
tProps(const CFX_WideString& swObjName, CFX_WideStringArray& array); | |
34 virtual void GetObjec
tMethods(const CFX_WideString& swObjName, CFX_WideStringArray& array); | |
35 | |
36 virtual void Exit(); | |
37 virtual void Enter(); | |
38 virtual FX_BOOL IsEntere
d(); | |
39 | |
40 CPDFDoc_Environment *
GetReaderApp(){return m_pApp;} | 31 CPDFDoc_Environment *
GetReaderApp(){return m_pApp;} |
41 | 32 |
42 FX_BOOL
InitJSObjects(); | 33 FX_BOOL
InitJSObjects(); |
43 | 34 |
44 FX_BOOL
AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType); | 35 FX_BOOL
AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType); |
45 void
RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType); | 36 void
RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType); |
46 void
RemoveEventsInLoop(CJS_FieldEvent* pStart); | 37 void
RemoveEventsInLoop(CJS_FieldEvent* pStart); |
47 | 38 |
48 void
BeginBlock(){m_bBlocking = TRUE;} | 39 void
BeginBlock(){m_bBlocking = TRUE;} |
49 void
EndBlock(){m_bBlocking = FALSE;} | 40 void
EndBlock(){m_bBlocking = FALSE;} |
(...skipping 11 matching lines...) Expand all Loading... |
61 FX_BOOL
m_bBlocking; | 52 FX_BOOL
m_bBlocking; |
62 CJS_FieldEvent* m_pField
EventPath; | 53 CJS_FieldEvent* m_pField
EventPath; |
63 | 54 |
64 v8::Isolate*
m_isolate; | 55 v8::Isolate*
m_isolate; |
65 v8::Persistent<v8::Context>
m_context; | 56 v8::Persistent<v8::Context>
m_context; |
66 FX_BOOL
m_bRegistered; | 57 FX_BOOL
m_bRegistered; |
67 }; | 58 }; |
68 | 59 |
69 #endif //_JS_RUNTIME_H_ | 60 #endif //_JS_RUNTIME_H_ |
70 | 61 |
OLD | NEW |