• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
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 <vector>
11 
12 #include "fxjs/cjs_object.h"
13 #include "fxjs/js_define.h"
14 
15 class CJS_Console final : public CJS_Object {
16  public:
17   static int GetObjDefnID();
18   static void DefineJSObjects(CFXJS_Engine* pEngine);
19 
20   CJS_Console(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
21   ~CJS_Console() override;
22 
23   JS_STATIC_METHOD(clear, CJS_Console)
24   JS_STATIC_METHOD(hide, CJS_Console)
25   JS_STATIC_METHOD(println, CJS_Console)
26   JS_STATIC_METHOD(show, CJS_Console)
27 
28  private:
29   static int ObjDefnID;
30   static const char kName[];
31   static const JSMethodSpec MethodSpecs[];
32 
33   CJS_Result clear(CJS_Runtime* pRuntime,
34                    const std::vector<v8::Local<v8::Value>>& params);
35   CJS_Result hide(CJS_Runtime* pRuntime,
36                   const std::vector<v8::Local<v8::Value>>& params);
37   CJS_Result println(CJS_Runtime* pRuntime,
38                      const std::vector<v8::Local<v8::Value>>& params);
39   CJS_Result show(CJS_Runtime* pRuntime,
40                   const std::vector<v8::Local<v8::Value>>& params);
41 };
42 
43 #endif  // FXJS_CJS_CONSOLE_H_
44