• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef FXJS_CJS_CONSOLE_H_
8 #define FXJS_CJS_CONSOLE_H_
9 
10 #include "core/fxcrt/span.h"
11 #include "fxjs/cjs_object.h"
12 #include "fxjs/js_define.h"
13 
14 class CJS_Console final : public CJS_Object {
15  public:
16   static uint32_t GetObjDefnID();
17   static void DefineJSObjects(CFXJS_Engine* pEngine);
18 
19   CJS_Console(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
20   ~CJS_Console() override;
21 
22   JS_STATIC_METHOD(clear, CJS_Console)
23   JS_STATIC_METHOD(hide, CJS_Console)
24   JS_STATIC_METHOD(println, CJS_Console)
25   JS_STATIC_METHOD(show, CJS_Console)
26 
27  private:
28   static uint32_t ObjDefnID;
29   static const char kName[];
30   static const JSMethodSpec MethodSpecs[];
31 
32   CJS_Result clear(CJS_Runtime* pRuntime,
33                    pdfium::span<v8::Local<v8::Value>> params);
34   CJS_Result hide(CJS_Runtime* pRuntime,
35                   pdfium::span<v8::Local<v8::Value>> params);
36   CJS_Result println(CJS_Runtime* pRuntime,
37                      pdfium::span<v8::Local<v8::Value>> params);
38   CJS_Result show(CJS_Runtime* pRuntime,
39                   pdfium::span<v8::Local<v8::Value>> params);
40 };
41 
42 #endif  // FXJS_CJS_CONSOLE_H_
43