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

Unified Diff: fpdfsdk/src/javascript/JS_Define.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/src/javascript/JS_Context.h ('k') | fpdfsdk/src/javascript/JS_Object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Define.h
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/src/javascript/JS_Define.h
index a3d98d54315d4eaf21c8e98d0646c908f26707db..766bf4baba6dc68f75e62c63facc43a8e08823b3 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/src/javascript/JS_Define.h
@@ -71,19 +71,18 @@ struct JSMethodSpec {
} \
;
-template <class C,
- FX_BOOL (C::*M)(IFXJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError)>
+template <
+ class C,
+ FX_BOOL (C::*M)(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
void JSPropGetter(const char* prop_name_string,
const char* class_name_string,
v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* pContext = pRuntime->GetCurrentContext();
+ IJS_Context* pContext = pRuntime->GetCurrentContext();
CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder());
C* pObj = reinterpret_cast<C*>(pJSObj->GetEmbedObject());
CFX_WideString sError;
@@ -97,20 +96,19 @@ void JSPropGetter(const char* prop_name_string,
info.GetReturnValue().Set((v8::Local<v8::Value>)value);
}
-template <class C,
- FX_BOOL (C::*M)(IFXJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError)>
+template <
+ class C,
+ FX_BOOL (C::*M)(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
void JSPropSetter(const char* prop_name_string,
const char* class_name_string,
v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* pContext = pRuntime->GetCurrentContext();
+ IJS_Context* pContext = pRuntime->GetCurrentContext();
CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder());
C* pObj = reinterpret_cast<C*>(pJSObj->GetEmbedObject());
CFX_WideString sError;
@@ -137,7 +135,7 @@ void JSPropSetter(const char* prop_name_string,
}
template <class C,
- FX_BOOL (C::*M)(IFXJS_Context* cc,
+ FX_BOOL (C::*M)(IJS_Context* cc,
const CJS_Parameters& params,
CJS_Value& vRet,
CFX_WideString& sError)>
@@ -145,10 +143,10 @@ void JSMethod(const char* method_name_string,
const char* class_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* cc = pRuntime->GetCurrentContext();
+ IJS_Context* cc = pRuntime->GetCurrentContext();
CJS_Parameters parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(isolate, info[i], CJS_Value::VT_unknown));
@@ -246,17 +244,17 @@ void JSMethod(const char* method_name_string,
DefineMethods(pIsolate); \
}
-#define DECLARE_JS_CLASS_RICH_PART() \
- static void JSConstructor(IFXJS_Context* cc, v8::Local<v8::Object> obj); \
- static void JSDestructor(v8::Local<v8::Object> obj); \
- static void DefineProps(v8::Isolate* pIsoalte); \
- static void DefineMethods(v8::Isolate* pIsoalte); \
- static JSPropertySpec JS_Class_Properties[]; \
+#define DECLARE_JS_CLASS_RICH_PART() \
+ static void JSConstructor(IJS_Context* cc, v8::Local<v8::Object> obj); \
+ static void JSDestructor(v8::Local<v8::Object> obj); \
+ static void DefineProps(v8::Isolate* pIsoalte); \
+ static void DefineMethods(v8::Isolate* pIsoalte); \
+ static JSPropertySpec JS_Class_Properties[]; \
static JSMethodSpec JS_Class_Methods[];
#define IMPLEMENT_JS_CLASS_RICH_PART(js_class_name, class_alternate, \
class_name) \
- void js_class_name::JSConstructor(IFXJS_Context* cc, \
+ void js_class_name::JSConstructor(IJS_Context* cc, \
v8::Local<v8::Object> obj) { \
CJS_Object* pObj = new js_class_name(obj); \
pObj->SetEmbedObject(new class_alternate(pObj)); \
@@ -367,10 +365,10 @@ void JSSpecialPropGet(const char* class_name,
v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
+ IJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
CJS_Object* pJSObj =
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
@@ -393,10 +391,10 @@ void JSSpecialPropPut(const char* class_name,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
+ IJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
CJS_Object* pJSObj =
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
@@ -416,10 +414,10 @@ void JSSpecialPropDel(const char* class_name,
v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
+ IJS_Context* pRuntimeContext = pRuntime->GetCurrentContext();
CJS_Object* pJSObj =
reinterpret_cast<CJS_Object*>(FXJS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
@@ -434,17 +432,17 @@ void JSSpecialPropDel(const char* class_name,
}
}
-template <FX_BOOL (*F)(IFXJS_Context* cc,
+template <FX_BOOL (*F)(IJS_Context* cc,
const CJS_Parameters& params,
CJS_Value& vRet,
CFX_WideString& sError)>
void JSGlobalFunc(const char* func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- IFXJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
+ IJS_Runtime* pRuntime = FXJS_GetRuntimeFromIsolate(isolate);
if (!pRuntime)
return;
- IFXJS_Context* cc = pRuntime->GetCurrentContext();
+ IJS_Context* cc = pRuntime->GetCurrentContext();
CJS_Parameters parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(isolate, info[i], CJS_Value::VT_unknown));
« no previous file with comments | « fpdfsdk/src/javascript/JS_Context.h ('k') | fpdfsdk/src/javascript/JS_Object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698