1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2016 The PDFium Authors 2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file. 4*3ac0a46fSAndroid Build Coastguard Worker 5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6*3ac0a46fSAndroid Build Coastguard Worker 7*3ac0a46fSAndroid Build Coastguard Worker #ifndef FXJS_CJS_ANNOT_H_ 8*3ac0a46fSAndroid Build Coastguard Worker #define FXJS_CJS_ANNOT_H_ 9*3ac0a46fSAndroid Build Coastguard Worker 10*3ac0a46fSAndroid Build Coastguard Worker #include "fpdfsdk/cpdfsdk_baannot.h" 11*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/cjs_object.h" 12*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/js_define.h" 13*3ac0a46fSAndroid Build Coastguard Worker 14*3ac0a46fSAndroid Build Coastguard Worker class CJS_Annot final : public CJS_Object { 15*3ac0a46fSAndroid Build Coastguard Worker public: 16*3ac0a46fSAndroid Build Coastguard Worker static uint32_t GetObjDefnID(); 17*3ac0a46fSAndroid Build Coastguard Worker static void DefineJSObjects(CFXJS_Engine* pEngine); 18*3ac0a46fSAndroid Build Coastguard Worker 19*3ac0a46fSAndroid Build Coastguard Worker CJS_Annot(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime); 20*3ac0a46fSAndroid Build Coastguard Worker ~CJS_Annot() override; 21*3ac0a46fSAndroid Build Coastguard Worker 22*3ac0a46fSAndroid Build Coastguard Worker void SetSDKAnnot(CPDFSDK_BAAnnot* annot); 23*3ac0a46fSAndroid Build Coastguard Worker 24*3ac0a46fSAndroid Build Coastguard Worker JS_STATIC_PROP(hidden, hidden, CJS_Annot) 25*3ac0a46fSAndroid Build Coastguard Worker JS_STATIC_PROP(name, name, CJS_Annot) 26*3ac0a46fSAndroid Build Coastguard Worker JS_STATIC_PROP(type, type, CJS_Annot) 27*3ac0a46fSAndroid Build Coastguard Worker 28*3ac0a46fSAndroid Build Coastguard Worker private: 29*3ac0a46fSAndroid Build Coastguard Worker static uint32_t ObjDefnID; 30*3ac0a46fSAndroid Build Coastguard Worker static const char kName[]; 31*3ac0a46fSAndroid Build Coastguard Worker static const JSPropertySpec PropertySpecs[]; 32*3ac0a46fSAndroid Build Coastguard Worker 33*3ac0a46fSAndroid Build Coastguard Worker CJS_Result get_hidden(CJS_Runtime* pRuntime); 34*3ac0a46fSAndroid Build Coastguard Worker CJS_Result set_hidden(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); 35*3ac0a46fSAndroid Build Coastguard Worker 36*3ac0a46fSAndroid Build Coastguard Worker CJS_Result get_name(CJS_Runtime* pRuntime); 37*3ac0a46fSAndroid Build Coastguard Worker CJS_Result set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); 38*3ac0a46fSAndroid Build Coastguard Worker 39*3ac0a46fSAndroid Build Coastguard Worker CJS_Result get_type(CJS_Runtime* pRuntime); 40*3ac0a46fSAndroid Build Coastguard Worker CJS_Result set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); 41*3ac0a46fSAndroid Build Coastguard Worker 42*3ac0a46fSAndroid Build Coastguard Worker ObservedPtr<CPDFSDK_BAAnnot> m_pAnnot; 43*3ac0a46fSAndroid Build Coastguard Worker }; 44*3ac0a46fSAndroid Build Coastguard Worker 45*3ac0a46fSAndroid Build Coastguard Worker #endif // FXJS_CJS_ANNOT_H_ 46