summaryrefslogtreecommitdiff
path: root/fxjs/cjs_annot.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-05 22:27:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-05 22:27:22 +0000
commitf743552fbdb17f974c9b1675af81210fe0ffcc50 (patch)
treed0eccefff3c758151428e18eb803e93d8864046a /fxjs/cjs_annot.h
parent998fee395fc8a543968c7db3db9e3cf81dee57fc (diff)
downloadpdfium-f743552fbdb17f974c9b1675af81210fe0ffcc50.tar.xz
Fold CJS_EmbedObj classes into CJS_Object classes
This CL removes the CJS_EmbedObj class and various subclasses and folds the subclasses into their CJS_Object counterparts. Change-Id: If6b882a4995c0b1bf83ac783f5c27ba9216c2d5c Reviewed-on: https://pdfium-review.googlesource.com/25410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_annot.h')
-rw-r--r--fxjs/cjs_annot.h40
1 files changed, 17 insertions, 23 deletions
diff --git a/fxjs/cjs_annot.h b/fxjs/cjs_annot.h
index 9f0d771a44..bbcf4ac178 100644
--- a/fxjs/cjs_annot.h
+++ b/fxjs/cjs_annot.h
@@ -10,10 +10,24 @@
#include "fpdfsdk/cpdfsdk_baannot.h"
#include "fxjs/JS_Define.h"
-class Annot : public CJS_EmbedObj {
+class CJS_Annot : public CJS_Object {
public:
- explicit Annot(CJS_Object* pJSObject);
- ~Annot() override;
+ static int GetObjDefnID();
+ static void DefineJSObjects(CFXJS_Engine* pEngine);
+
+ explicit CJS_Annot(v8::Local<v8::Object> pObject);
+ ~CJS_Annot() override;
+
+ void SetSDKAnnot(CPDFSDK_BAAnnot* annot) { m_pAnnot.Reset(annot); }
+
+ JS_STATIC_PROP(hidden, hidden, CJS_Annot);
+ JS_STATIC_PROP(name, name, CJS_Annot);
+ JS_STATIC_PROP(type, type, CJS_Annot);
+
+ private:
+ static int ObjDefnID;
+ static const char kName[];
+ static const JSPropertySpec PropertySpecs[];
CJS_Return get_hidden(CJS_Runtime* pRuntime);
CJS_Return set_hidden(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
@@ -24,27 +38,7 @@ class Annot : public CJS_EmbedObj {
CJS_Return get_type(CJS_Runtime* pRuntime);
CJS_Return set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
- void SetSDKAnnot(CPDFSDK_BAAnnot* annot);
-
- private:
CPDFSDK_Annot::ObservedPtr m_pAnnot;
};
-class CJS_Annot : public CJS_Object {
- public:
- static int GetObjDefnID();
- static void DefineJSObjects(CFXJS_Engine* pEngine);
-
- explicit CJS_Annot(v8::Local<v8::Object> pObject);
- ~CJS_Annot() override = default;
-
- JS_STATIC_PROP(hidden, hidden, Annot);
- JS_STATIC_PROP(name, name, Annot);
- JS_STATIC_PROP(type, type, Annot);
-
- private:
- static int ObjDefnID;
- static const JSPropertySpec PropertySpecs[];
-};
-
#endif // FXJS_CJS_ANNOT_H_