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 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but | 7 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but |
8 // has no knowledge of PDF-specific native objects. It could in theory be used | 8 // has no knowledge of PDF-specific native objects. It could in theory be used |
9 // to implement other sets of native objects. | 9 // to implement other sets of native objects. |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Called after FXJS_Define* calls made. | 129 // Called after FXJS_Define* calls made. |
130 void FXJS_InitializeRuntime( | 130 void FXJS_InitializeRuntime( |
131 v8::Isolate* pIsolate, | 131 v8::Isolate* pIsolate, |
132 IJS_Runtime* pIRuntime, | 132 IJS_Runtime* pIRuntime, |
133 v8::Global<v8::Context>* pV8PersistentContext, | 133 v8::Global<v8::Context>* pV8PersistentContext, |
134 std::vector<v8::Global<v8::Object>*>* pStaticObjects); | 134 std::vector<v8::Global<v8::Object>*>* pStaticObjects); |
135 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, | 135 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, |
136 v8::Global<v8::Context>* pV8PersistentContext, | 136 v8::Global<v8::Context>* pV8PersistentContext, |
137 std::vector<v8::Global<v8::Object>*>* pStaticObjects); | 137 std::vector<v8::Global<v8::Object>*>* pStaticObjects); |
138 | 138 |
| 139 IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); |
| 140 |
139 // Called as part of FXJS_InitializeRuntime, exposed so PDF can make its | 141 // Called as part of FXJS_InitializeRuntime, exposed so PDF can make its |
140 // own contexts compatible with XFA or vice versa. | 142 // own contexts compatible with XFA or vice versa. |
141 void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context, | 143 void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context, |
142 IJS_Runtime* pIRuntime); | 144 IJS_Runtime* pIRuntime); |
143 | 145 |
144 IJS_Runtime* FXJS_GetRuntimeFromV8Context(v8::Local<v8::Context> v8Context); | |
145 | |
146 // Called after FXJS_InitializeRuntime call made. | 146 // Called after FXJS_InitializeRuntime call made. |
147 int FXJS_Execute(v8::Isolate* pIsolate, | 147 int FXJS_Execute(v8::Isolate* pIsolate, |
148 IJS_Context* pJSContext, | 148 IJS_Context* pJSContext, |
149 const wchar_t* script, | 149 const wchar_t* script, |
150 FXJSErr* perror); | 150 FXJSErr* perror); |
151 | 151 |
152 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, | 152 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, |
153 IJS_Runtime* pJSContext, | 153 IJS_Runtime* pJSContext, |
154 int nObjDefnID); | 154 int nObjDefnID); |
155 v8::Local<v8::Object> FXJS_GetThisObj(v8::Isolate* pIsolate); | 155 v8::Local<v8::Object> FXJS_GetThisObj(v8::Isolate* pIsolate); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); | 230 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); |
231 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, | 231 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, |
232 v8::Local<v8::Value> pValue); | 232 v8::Local<v8::Value> pValue); |
233 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, | 233 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, |
234 v8::Local<v8::Value> pValue); | 234 v8::Local<v8::Value> pValue); |
235 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, | 235 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, |
236 v8::Local<v8::Value> pValue); | 236 v8::Local<v8::Value> pValue); |
237 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); | 237 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); |
238 | 238 |
239 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ | 239 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ |
OLD | NEW |