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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate, | 126 void FXJS_DefineGlobalConst(v8::Isolate* pIsolate, |
127 const wchar_t* sConstName, | 127 const wchar_t* sConstName, |
128 v8::Local<v8::Value> pDefault); | 128 v8::Local<v8::Value> pDefault); |
129 | 129 |
130 // Called after FXJS_Define* calls made. | 130 // Called after FXJS_Define* calls made. |
131 void FXJS_InitializeRuntime(v8::Isolate* pIsolate, | 131 void FXJS_InitializeRuntime(v8::Isolate* pIsolate, |
132 IJS_Runtime* pIRuntime, | 132 IJS_Runtime* pIRuntime, |
133 v8::Global<v8::Context>& v8PersistentContext); | 133 v8::Global<v8::Context>& v8PersistentContext); |
134 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, | 134 void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, |
135 v8::Global<v8::Context>& v8PersistentContext); | 135 v8::Global<v8::Context>& v8PersistentContext); |
136 IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); | 136 |
| 137 // Called as part of FXJS_InitializeRuntime, exposed so PDF can make its |
| 138 // own contexts compatible with XFA or vice versa. |
| 139 void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context, |
| 140 IJS_Runtime* pIRuntime); |
| 141 |
| 142 IJS_Runtime* FXJS_GetRuntimeFromV8Context(v8::Local<v8::Context> v8Context); |
137 | 143 |
138 // Called after FXJS_InitializeRuntime call made. | 144 // Called after FXJS_InitializeRuntime call made. |
139 int FXJS_Execute(v8::Isolate* pIsolate, | 145 int FXJS_Execute(v8::Isolate* pIsolate, |
140 IJS_Context* pJSContext, | 146 IJS_Context* pJSContext, |
141 const wchar_t* script, | 147 const wchar_t* script, |
142 FXJSErr* perror); | 148 FXJSErr* perror); |
143 | 149 |
144 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, | 150 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, |
145 IJS_Runtime* pJSContext, | 151 IJS_Runtime* pJSContext, |
146 int nObjDefnID); | 152 int nObjDefnID); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); | 228 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); |
223 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, | 229 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, |
224 v8::Local<v8::Value> pValue); | 230 v8::Local<v8::Value> pValue); |
225 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, | 231 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, |
226 v8::Local<v8::Value> pValue); | 232 v8::Local<v8::Value> pValue); |
227 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, | 233 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, |
228 v8::Local<v8::Value> pValue); | 234 v8::Local<v8::Value> pValue); |
229 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); | 235 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); |
230 | 236 |
231 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ | 237 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ |
OLD | NEW |