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

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

Issue 1386173002: Rename IFXJS_Runtime and IFXJS_Context to IJS_. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Comment in fxjs_v8.h 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/javascript/IJavaScript.h ('k') | fpdfsdk/src/fsdk_actionhandler.cpp » ('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 f174b21f0ab7270b6cd5075a13e16d05fea0ddf2..651414b53b58a811137681062143d966b5124329 100644
--- a/fpdfsdk/include/jsapi/fxjs_v8.h
+++ b/fpdfsdk/include/jsapi/fxjs_v8.h
@@ -4,8 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-// PDFium wrapper around V8 APIs. PDFium code should include this file rather
-// than including V8 headers directly.
+// FXJS_V8 is a layer that makes it easier to define native objects in V8, but
+// has no knowledge of PDF-specific native objects. It could in theory be used
+// to implement other sets of native objects.
+
+// PDFium code should include this file rather than including V8 headers
+// directly.
#ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
#define FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_
@@ -15,8 +19,8 @@
// FXJS_V8 places no interpretation on these two classes; it merely
// passes them on to the caller-provided FXJS_CONSTRUCTORs.
-class IFXJS_Context;
-class IFXJS_Runtime;
+class IJS_Context;
+class IJS_Runtime;
enum FXJSOBJTYPE {
FXJSOBJTYPE_DYNAMIC = 0, // Created by native method and returned to JS.
@@ -57,7 +61,7 @@ class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
void Free(void* data, size_t length) override;
};
-using FXJS_CONSTRUCTOR = void (*)(IFXJS_Context* cc, v8::Local<v8::Object> obj);
+using FXJS_CONSTRUCTOR = void (*)(IJS_Context* cc, v8::Local<v8::Object> obj);
using FXJS_DESTRUCTOR = void (*)(v8::Local<v8::Object> obj);
// Call before making FXJS_PrepareIsolate call.
@@ -115,22 +119,22 @@ void FXJS_DefineGlobalConst(v8::Isolate* pIsolate,
// Called after FXJS_Define* calls made.
void FXJS_InitializeRuntime(v8::Isolate* pIsolate,
- IFXJS_Runtime* pFXRuntime,
- IFXJS_Context* context,
+ IJS_Runtime* pFXRuntime,
+ IJS_Context* context,
v8::Global<v8::Context>& v8PersistentContext);
void FXJS_ReleaseRuntime(v8::Isolate* pIsolate,
v8::Global<v8::Context>& v8PersistentContext);
-IFXJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate);
+IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate);
// Called after FXJS_InitializeRuntime call made.
int FXJS_Execute(v8::Isolate* pIsolate,
- IFXJS_Context* pJSContext,
+ IJS_Context* pJSContext,
const wchar_t* script,
long length,
FXJSErr* perror);
v8::Local<v8::Object> FXJS_NewFxDynamicObj(v8::Isolate* pIsolate,
- IFXJS_Context* pJSContext,
+ IJS_Context* pJSContext,
int nObjDefnID);
v8::Local<v8::Object> FXJS_GetThisObj(v8::Isolate* pIsolate);
int FXJS_GetObjDefnID(v8::Local<v8::Object> pObj);
« no previous file with comments | « fpdfsdk/include/javascript/IJavaScript.h ('k') | fpdfsdk/src/fsdk_actionhandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698