summaryrefslogtreecommitdiff
path: root/fxjs/cjs_icon.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_icon.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_icon.h')
-rw-r--r--fxjs/cjs_icon.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/fxjs/cjs_icon.h b/fxjs/cjs_icon.h
index 3ded32f83a..a346d69e73 100644
--- a/fxjs/cjs_icon.h
+++ b/fxjs/cjs_icon.h
@@ -9,34 +9,28 @@
#include "fxjs/JS_Define.h"
-class Icon : public CJS_EmbedObj {
- public:
- explicit Icon(CJS_Object* pJSObject);
- ~Icon() override;
-
- CJS_Return get_name(CJS_Runtime* pRuntime);
- CJS_Return set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
-
- WideString GetIconName() const { return m_swIconName; }
- void SetIconName(WideString name) { m_swIconName = name; }
-
- private:
- WideString m_swIconName;
-};
-
class CJS_Icon : public CJS_Object {
public:
static int GetObjDefnID();
static void DefineJSObjects(CFXJS_Engine* pEngine);
explicit CJS_Icon(v8::Local<v8::Object> pObject);
- ~CJS_Icon() override = default;
+ ~CJS_Icon() override;
+
+ WideString GetIconName() const { return m_swIconName; }
+ void SetIconName(WideString name) { m_swIconName = name; }
- JS_STATIC_PROP(name, name, Icon);
+ JS_STATIC_PROP(name, name, CJS_Icon);
private:
static int ObjDefnID;
+ static const char kName[];
static const JSPropertySpec PropertySpecs[];
+
+ CJS_Return get_name(CJS_Runtime* pRuntime);
+ CJS_Return set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
+
+ WideString m_swIconName;
};
#endif // FXJS_CJS_ICON_H_