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 FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ |
8 #define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 public: | 42 public: |
43 explicit CJS_Object(v8::Local<v8::Object> pObject); | 43 explicit CJS_Object(v8::Local<v8::Object> pObject); |
44 virtual ~CJS_Object(); | 44 virtual ~CJS_Object(); |
45 | 45 |
46 void MakeWeak(); | 46 void MakeWeak(); |
47 void Dispose(); | 47 void Dispose(); |
48 | 48 |
49 virtual FX_BOOL IsType(const FX_CHAR* sClassName) { return TRUE; } | 49 virtual FX_BOOL IsType(const FX_CHAR* sClassName) { return TRUE; } |
50 virtual CFX_ByteString GetClassName() { return ""; } | 50 virtual CFX_ByteString GetClassName() { return ""; } |
51 | 51 |
52 virtual FX_BOOL InitInstance(IFXJS_Context* cc) { return TRUE; } | 52 virtual FX_BOOL InitInstance(IJS_Context* cc) { return TRUE; } |
53 virtual FX_BOOL ExitInstance() { return TRUE; } | 53 virtual FX_BOOL ExitInstance() { return TRUE; } |
54 | 54 |
55 v8::Local<v8::Object> ToV8Object() { return m_pV8Object.Get(m_pIsolate); } | 55 v8::Local<v8::Object> ToV8Object() { return m_pV8Object.Get(m_pIsolate); } |
56 | 56 |
57 // Takes ownership of |pObj|. | 57 // Takes ownership of |pObj|. |
58 void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); } | 58 void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); } |
59 CJS_EmbedObj* GetEmbedObject() const { return m_pEmbedObj.get(); } | 59 CJS_EmbedObj* GetEmbedObject() const { return m_pEmbedObj.get(); } |
60 | 60 |
61 static int MsgBox(CPDFDoc_Environment* pApp, | 61 static int MsgBox(CPDFDoc_Environment* pApp, |
62 const FX_WCHAR* swMsg, | 62 const FX_WCHAR* swMsg, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 // data | 108 // data |
109 const int m_nType; // 0:Interval; 1:TimeOut | 109 const int m_nType; // 0:Interval; 1:TimeOut |
110 const FX_DWORD m_dwTimeOut; | 110 const FX_DWORD m_dwTimeOut; |
111 const CFX_WideString m_swJScript; | 111 const CFX_WideString m_swJScript; |
112 CJS_Runtime* const m_pRuntime; | 112 CJS_Runtime* const m_pRuntime; |
113 CPDFDoc_Environment* const m_pApp; | 113 CPDFDoc_Environment* const m_pApp; |
114 }; | 114 }; |
115 | 115 |
116 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ | 116 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_ |
OLD | NEW |