diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-11 13:21:50 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-11 13:21:50 -0700 |
commit | 142165e2f62b8ba727e8aab40591ca3a7b6fa214 (patch) | |
tree | 66983430b5997e9852a18009b814cde7a1828c56 /fpdfsdk/include/jsapi/fxjs_v8.h | |
parent | 570875c067ab1b4c81fac2cfe908f867d3979d3a (diff) | |
download | pdfium-142165e2f62b8ba727e8aab40591ca3a7b6fa214.tar.xz |
Merge to XFA: Fix strings, ..., void return types for Consts.h.
(cherry picked from commit f9e40aec10263f9445d69598657f42550294d653)
Orignal Review URL: https://codereview.chromium.org/1342433002 .
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338003004 .
Diffstat (limited to 'fpdfsdk/include/jsapi/fxjs_v8.h')
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 8e52c68845..4195686731 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -36,8 +36,14 @@ struct FXJSErr { unsigned linnum; }; -/* --------------------------------------------- API - * --------------------------------------------- */ +extern const wchar_t kFXJSValueNameString[]; +extern const wchar_t kFXJSValueNameNumber[]; +extern const wchar_t kFXJSValueNameBoolean[]; +extern const wchar_t kFXJSValueNameDate[]; +extern const wchar_t kFXJSValueNameObject[]; +extern const wchar_t kFXJSValueNameFxobj[]; +extern const wchar_t kFXJSValueNameNull[]; +extern const wchar_t kFXJSValueNameUndefined[]; class IFXJS_Context; class IFXJS_Runtime; @@ -47,36 +53,38 @@ typedef void (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Local<v8::Object> global); typedef void (*LP_DESTRUCTOR)(v8::Local<v8::Object> obj); +// Always returns a valid, newly-created objDefnID. int JS_DefineObj(v8::Isolate* pIsolate, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUCTOR pConstructor, LP_DESTRUCTOR pDestructor); -int JS_DefineObjMethod(v8::Isolate* pIsolate, + +void JS_DefineObjMethod(v8::Isolate* pIsolate, + int nObjDefnID, + const wchar_t* sMethodName, + v8::FunctionCallback pMethodCall); +void JS_DefineObjProperty(v8::Isolate* pIsolate, + int nObjDefnID, + const wchar_t* sPropName, + v8::AccessorGetterCallback pPropGet, + v8::AccessorSetterCallback pPropPut); +void JS_DefineObjAllProperties(v8::Isolate* pIsolate, + int nObjDefnID, + v8::NamedPropertyQueryCallback pPropQurey, + v8::NamedPropertyGetterCallback pPropGet, + v8::NamedPropertySetterCallback pPropPut, + v8::NamedPropertyDeleterCallback pPropDel); +void JS_DefineObjConst(v8::Isolate* pIsolate, int nObjDefnID, - const wchar_t* sMethodName, - v8::FunctionCallback pMethodCall); -int JS_DefineObjProperty(v8::Isolate* pIsolate, - int nObjDefnID, - const wchar_t* sPropName, - v8::AccessorGetterCallback pPropGet, - v8::AccessorSetterCallback pPropPut); -int JS_DefineObjAllProperties(v8::Isolate* pIsolate, - int nObjDefnID, - v8::NamedPropertyQueryCallback pPropQurey, - v8::NamedPropertyGetterCallback pPropGet, - v8::NamedPropertySetterCallback pPropPut, - v8::NamedPropertyDeleterCallback pPropDel); -int JS_DefineObjConst(v8::Isolate* pIsolate, - int nObjDefnID, - const wchar_t* sConstName, - v8::Local<v8::Value> pDefault); -int JS_DefineGlobalMethod(v8::Isolate* pIsolate, - const wchar_t* sMethodName, - v8::FunctionCallback pMethodCall); -int JS_DefineGlobalConst(v8::Isolate* pIsolate, - const wchar_t* sConstName, - v8::Local<v8::Value> pDefault); + const wchar_t* sConstName, + v8::Local<v8::Value> pDefault); +void JS_DefineGlobalMethod(v8::Isolate* pIsolate, + const wchar_t* sMethodName, + v8::FunctionCallback pMethodCall); +void JS_DefineGlobalConst(v8::Isolate* pIsolate, + const wchar_t* sConstName, + v8::Local<v8::Value> pDefault); void JS_InitialRuntime(v8::Isolate* pIsolate, IFXJS_Runtime* pFXRuntime, |