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

Unified Diff: fpdfsdk/include/jsapi/fxjs_v8.h

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/javascript/IJavaScript.h ('k') | fpdfsdk/include/pdfwindow/PWL_Edit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/jsapi/fxjs_v8.h
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h
index b8a63c6c7bc3bae4cb54d9121671f884925cc57a..992721e90a2590a05f235ed04c981862c1ff271d 100644
--- a/fpdfsdk/include/jsapi/fxjs_v8.h
+++ b/fpdfsdk/include/jsapi/fxjs_v8.h
@@ -27,6 +27,12 @@ class CFXJS_ObjDefinition;
class IJS_Context; // A description of the event that caused JS execution.
class IJS_Runtime; // A native runtime, typically owns the v8::Context.
+#ifdef PDF_ENABLE_XFA
+// FXJS_V8 places no interpreation on this calass; it merely passes it
+// along to XFA.
+class CFXJSE_RuntimeData;
+
+#endif
enum FXJSOBJTYPE {
FXJSOBJTYPE_DYNAMIC = 0, // Created by native method and returned to JS.
FXJSOBJTYPE_STATIC, // Created by init and hung off of global object.
@@ -45,9 +51,16 @@ class FXJS_PerIsolateData {
static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate);
std::vector<CFXJS_ObjDefinition*> m_ObjectDefnArray;
+#ifdef PDF_ENABLE_XFA
+ CFXJSE_RuntimeData* m_pFXJSERuntimeData;
+#endif
protected:
+#ifndef PDF_ENABLE_XFA
FXJS_PerIsolateData() {}
+#else
+ FXJS_PerIsolateData() : m_pFXJSERuntimeData(nullptr) {}
+#endif
};
extern const wchar_t kFXJSValueNameString[];
@@ -132,6 +145,13 @@ void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
std::vector<v8::Global<v8::Object>*>* pStaticObjects);
IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate);
+#ifdef PDF_ENABLE_XFA
+// Called as part of FXJS_InitializeRuntime, exposed so PDF can make its
+// own contexts compatible with XFA or vice versa.
+void FXJS_SetRuntimeForV8Context(v8::Local<v8::Context> v8Context,
+ IJS_Runtime* pIRuntime);
+
+#endif
// Called after FXJS_InitializeRuntime call made.
int FXJS_Execute(v8::Isolate* pIsolate,
IJS_Context* pJSContext,
« no previous file with comments | « fpdfsdk/include/javascript/IJavaScript.h ('k') | fpdfsdk/include/pdfwindow/PWL_Edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698