Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: fpdfsdk/include/jsapi/fxjs_v8.h

Issue 1382683008: Merge to XFA: Store object definition ID in each js_class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/Document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // PDFium wrapper around V8 APIs. PDFium code should include this file rather 7 // PDFium wrapper around V8 APIs. PDFium code should include this file rather
8 // than including V8 headers directly. 8 // than including V8 headers directly.
9 9
10 #ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 10 #ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
11 #define FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 11 #define FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
12 12
13 #include <v8.h> 13 #include <v8.h>
14 #include "../../../core/include/fxcrt/fx_basic.h" 14 #include "../../../core/include/fxcrt/fx_basic.h"
15 15
16 // FXJS_V8 places no interpretation on these two classes; it merely 16 // FXJS_V8 places no interpretation on these two classes; it merely
17 // passes them on to the caller-provided FXJS_CONSTRUCTORs. 17 // passes them on to the caller-provided FXJS_CONSTRUCTORs.
18 class IFXJS_Context; 18 class IFXJS_Context;
19 class IFXJS_Runtime; 19 class IFXJS_Runtime;
20 20
21 // FXJS_V8 places no interpreation on this calass; it merely passes it 21 // FXJS_V8 places no interpreation on this calass; it merely passes it
22 // along to XFA. 22 // along to XFA.
23 class CFXJSE_RuntimeData; 23 class CFXJSE_RuntimeData;
24 24
25 enum FXJSOBJTYPE { 25 enum FXJSOBJTYPE {
26 FXJS_DYNAMIC = 0, 26 FXJSOBJTYPE_DYNAMIC = 0, // Created by native method and returned to JS.
27 FXJS_STATIC = 1, 27 FXJSOBJTYPE_STATIC, // Created by init and hung off of global object.
28 FXJSOBJTYPE_GLOBAL, // The global object itself (may only appear once).
28 }; 29 };
29 30
30 struct FXJSErr { 31 struct FXJSErr {
31 const wchar_t* message; 32 const wchar_t* message;
32 const wchar_t* srcline; 33 const wchar_t* srcline;
33 unsigned linnum; 34 unsigned linnum;
34 }; 35 };
35 36
36 class FXJS_PerIsolateData { 37 class FXJS_PerIsolateData {
37 public: 38 public:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 IFXJS_Context* pJSContext, 126 IFXJS_Context* pJSContext,
126 const wchar_t* script, 127 const wchar_t* script,
127 long length, 128 long length,
128 FXJSErr* perror); 129 FXJSErr* perror);
129 130
130 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, 131 v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate,
131 IFXJS_Context* pJSContext, 132 IFXJS_Context* pJSContext,
132 int nObjDefnID); 133 int nObjDefnID);
133 v8::Local<v8::Object> FXJS_GetThisObj(v8::Isolate* pIsolate); 134 v8::Local<v8::Object> FXJS_GetThisObj(v8::Isolate* pIsolate);
134 int FXJS_GetObjDefnID(v8::Local<v8::Object> pObj); 135 int FXJS_GetObjDefnID(v8::Local<v8::Object> pObj);
135 int FXJS_GetObjDefnID(v8::Isolate* pIsolate, const wchar_t* pObjName);
136 v8::Isolate* FXJS_GetRuntime(v8::Local<v8::Object> pObj); 136 v8::Isolate* FXJS_GetRuntime(v8::Local<v8::Object> pObj);
137 const wchar_t* FXJS_GetTypeof(v8::Local<v8::Value> pObj); 137 const wchar_t* FXJS_GetTypeof(v8::Local<v8::Value> pObj);
138 138
139 void FXJS_SetPrivate(v8::Isolate* pIsolate, 139 void FXJS_SetPrivate(v8::Isolate* pIsolate,
140 v8::Local<v8::Object> pObj, 140 v8::Local<v8::Object> pObj,
141 void* p); 141 void* p);
142 void* FXJS_GetPrivate(v8::Isolate* pIsolate, v8::Local<v8::Object> pObj); 142 void* FXJS_GetPrivate(v8::Isolate* pIsolate, v8::Local<v8::Object> pObj);
143 void FXJS_FreePrivate(void* p); 143 void FXJS_FreePrivate(void* p);
144 void FXJS_FreePrivate(v8::Local<v8::Object> pObj); 144 void FXJS_FreePrivate(v8::Local<v8::Object> pObj);
145 145
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue); 210 double FXJS_ToNumber(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue);
211 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate, 211 v8::Local<v8::Object> FXJS_ToObject(v8::Isolate* pIsolate,
212 v8::Local<v8::Value> pValue); 212 v8::Local<v8::Value> pValue);
213 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate, 213 CFX_WideString FXJS_ToString(v8::Isolate* pIsolate,
214 v8::Local<v8::Value> pValue); 214 v8::Local<v8::Value> pValue);
215 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate, 215 v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate,
216 v8::Local<v8::Value> pValue); 216 v8::Local<v8::Value> pValue);
217 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom); 217 void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom);
218 218
219 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ 219 #endif // FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698