From f743552fbdb17f974c9b1675af81210fe0ffcc50 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 5 Feb 2018 22:27:22 +0000 Subject: 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 Reviewed-by: Tom Sepez --- fxjs/cjs_console.h | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'fxjs/cjs_console.h') diff --git a/fxjs/cjs_console.h b/fxjs/cjs_console.h index 22c18dec12..56243cf6a5 100644 --- a/fxjs/cjs_console.h +++ b/fxjs/cjs_console.h @@ -11,37 +11,31 @@ #include "fxjs/JS_Define.h" -class console : public CJS_EmbedObj { - public: - explicit console(CJS_Object* pJSObject); - ~console() override; - - public: - CJS_Return clear(CJS_Runtime* pRuntime, - const std::vector>& params); - CJS_Return hide(CJS_Runtime* pRuntime, - const std::vector>& params); - CJS_Return println(CJS_Runtime* pRuntime, - const std::vector>& params); - CJS_Return show(CJS_Runtime* pRuntime, - const std::vector>& params); -}; - class CJS_Console : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Console(v8::Local pObject); - ~CJS_Console() override = default; + ~CJS_Console() override; - JS_STATIC_METHOD(clear, console); - JS_STATIC_METHOD(hide, console); - JS_STATIC_METHOD(println, console); - JS_STATIC_METHOD(show, console); + JS_STATIC_METHOD(clear, CJS_Console); + JS_STATIC_METHOD(hide, CJS_Console); + JS_STATIC_METHOD(println, CJS_Console); + JS_STATIC_METHOD(show, CJS_Console); private: static int ObjDefnID; + static const char kName[]; static const JSMethodSpec MethodSpecs[]; + + CJS_Return clear(CJS_Runtime* pRuntime, + const std::vector>& params); + CJS_Return hide(CJS_Runtime* pRuntime, + const std::vector>& params); + CJS_Return println(CJS_Runtime* pRuntime, + const std::vector>& params); + CJS_Return show(CJS_Runtime* pRuntime, + const std::vector>& params); }; #endif // FXJS_CJS_CONSOLE_H_ -- cgit v1.2.3