| 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 XFA_FXJSE_CONTEXT_H_ | 7 #ifndef XFA_FXJSE_CONTEXT_H_ |
| 8 #define XFA_FXJSE_CONTEXT_H_ | 8 #define XFA_FXJSE_CONTEXT_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "core/fxcrt/include/fx_basic.h" | 13 #include "core/fxcrt/include/fx_basic.h" |
| 14 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
| 15 #include "xfa/fxjse/include/fxjse.h" | 15 #include "xfa/fxjse/include/fxjse.h" |
| 16 | 16 |
| 17 class CFXJSE_Class; | 17 class CFXJSE_Class; |
| 18 class CFXJSE_Value; | 18 class CFXJSE_Value; |
| 19 struct FXJSE_CLASS; |
| 19 | 20 |
| 20 class CFXJSE_Context { | 21 class CFXJSE_Context { |
| 21 public: | 22 public: |
| 22 static CFXJSE_Context* Create(v8::Isolate* pIsolate, | 23 static CFXJSE_Context* Create(v8::Isolate* pIsolate, |
| 23 const FXJSE_CLASS* lpGlobalClass = nullptr, | 24 const FXJSE_CLASS* lpGlobalClass = nullptr, |
| 24 void* lpGlobalObject = nullptr); | 25 void* lpGlobalObject = nullptr); |
| 25 ~CFXJSE_Context(); | 26 ~CFXJSE_Context(); |
| 26 | 27 |
| 27 V8_INLINE v8::Isolate* GetRuntime(void) { return m_pIsolate; } | 28 V8_INLINE v8::Isolate* GetRuntime(void) { return m_pIsolate; } |
| 28 void GetGlobalObject(CFXJSE_Value* pValue); | 29 void GetGlobalObject(CFXJSE_Value* pValue); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 friend class CFXJSE_Class; | 44 friend class CFXJSE_Class; |
| 44 friend class CFXJSE_ScopeUtil_IsolateHandleContext; | 45 friend class CFXJSE_ScopeUtil_IsolateHandleContext; |
| 45 friend class CFXJSE_ScopeUtil_IsolateHandleRootOrNormalContext; | 46 friend class CFXJSE_ScopeUtil_IsolateHandleRootOrNormalContext; |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate, | 49 v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate, |
| 49 v8::TryCatch& trycatch); | 50 v8::TryCatch& trycatch); |
| 50 | 51 |
| 51 #endif // XFA_FXJSE_CONTEXT_H_ | 52 #endif // XFA_FXJSE_CONTEXT_H_ |
| OLD | NEW |