diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-05 22:27:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-05 22:27:22 +0000 |
commit | f743552fbdb17f974c9b1675af81210fe0ffcc50 (patch) | |
tree | d0eccefff3c758151428e18eb803e93d8864046a /fxjs/cjs_event.h | |
parent | 998fee395fc8a543968c7db3db9e3cf81dee57fc (diff) | |
download | pdfium-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_event.h')
-rw-r--r-- | fxjs/cjs_event.h | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/fxjs/cjs_event.h b/fxjs/cjs_event.h index fa8c40b5ee..291b6eb3cc 100644 --- a/fxjs/cjs_event.h +++ b/fxjs/cjs_event.h @@ -9,10 +9,38 @@ #include "fxjs/JS_Define.h" -class event : public CJS_EmbedObj { +class CJS_Event : public CJS_Object { public: - explicit event(CJS_Object* pJSObject); - ~event() override; + static void DefineJSObjects(CFXJS_Engine* pEngine); + + explicit CJS_Event(v8::Local<v8::Object> pObject); + ~CJS_Event() override; + + JS_STATIC_PROP(change, change, CJS_Event); + JS_STATIC_PROP(changeEx, change_ex, CJS_Event); + JS_STATIC_PROP(commitKey, commit_key, CJS_Event); + JS_STATIC_PROP(fieldFull, field_full, CJS_Event); + JS_STATIC_PROP(keyDown, key_down, CJS_Event); + JS_STATIC_PROP(modifier, modifier, CJS_Event); + JS_STATIC_PROP(name, name, CJS_Event); + JS_STATIC_PROP(rc, rc, CJS_Event); + JS_STATIC_PROP(richChange, rich_change, CJS_Event); + JS_STATIC_PROP(richChangeEx, rich_change_ex, CJS_Event); + JS_STATIC_PROP(richValue, rich_value, CJS_Event); + JS_STATIC_PROP(selEnd, sel_end, CJS_Event); + JS_STATIC_PROP(selStart, sel_start, CJS_Event); + JS_STATIC_PROP(shift, shift, CJS_Event); + JS_STATIC_PROP(source, source, CJS_Event); + JS_STATIC_PROP(target, target, CJS_Event); + JS_STATIC_PROP(targetName, target_name, CJS_Event); + JS_STATIC_PROP(type, type, CJS_Event); + JS_STATIC_PROP(value, value, CJS_Event); + JS_STATIC_PROP(willCommit, will_commit, CJS_Event); + + private: + static int ObjDefnID; + static const char kName[]; + static const JSPropertySpec PropertySpecs[]; CJS_Return get_change(CJS_Runtime* pRuntime); CJS_Return set_change(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); @@ -75,37 +103,4 @@ class event : public CJS_EmbedObj { CJS_Return set_will_commit(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); }; -class CJS_Event : public CJS_Object { - public: - static void DefineJSObjects(CFXJS_Engine* pEngine); - - explicit CJS_Event(v8::Local<v8::Object> pObject); - ~CJS_Event() override = default; - - JS_STATIC_PROP(change, change, event); - JS_STATIC_PROP(changeEx, change_ex, event); - JS_STATIC_PROP(commitKey, commit_key, event); - JS_STATIC_PROP(fieldFull, field_full, event); - JS_STATIC_PROP(keyDown, key_down, event); - JS_STATIC_PROP(modifier, modifier, event); - JS_STATIC_PROP(name, name, event); - JS_STATIC_PROP(rc, rc, event); - JS_STATIC_PROP(richChange, rich_change, event); - JS_STATIC_PROP(richChangeEx, rich_change_ex, event); - JS_STATIC_PROP(richValue, rich_value, event); - JS_STATIC_PROP(selEnd, sel_end, event); - JS_STATIC_PROP(selStart, sel_start, event); - JS_STATIC_PROP(shift, shift, event); - JS_STATIC_PROP(source, source, event); - JS_STATIC_PROP(target, target, event); - JS_STATIC_PROP(targetName, target_name, event); - JS_STATIC_PROP(type, type, event); - JS_STATIC_PROP(value, value, event); - JS_STATIC_PROP(willCommit, will_commit, event); - - private: - static int ObjDefnID; - static const JSPropertySpec PropertySpecs[]; -}; - #endif // FXJS_CJS_EVENT_H_ |