summaryrefslogtreecommitdiff
path: root/fxjs/cjs_console.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_console.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_console.h')
-rw-r--r--fxjs/cjs_console.h36
1 files changed, 15 insertions, 21 deletions
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<v8::Local<v8::Value>>& params);
- CJS_Return hide(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params);
- CJS_Return println(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params);
- CJS_Return show(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params);
-};
-
class CJS_Console : public CJS_Object {
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
explicit CJS_Console(v8::Local<v8::Object> 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<v8::Local<v8::Value>>& params);
+ CJS_Return hide(CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ CJS_Return println(CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ CJS_Return show(CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
};
#endif // FXJS_CJS_CONSOLE_H_