Remove JavaScript.h
[pdfium.git] / fpdfsdk / src / javascript / console.cpp
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 #include "../../include/javascript/IJavaScript.h"
8 #include "../../include/javascript/JS_Define.h"
9 #include "../../include/javascript/JS_Object.h"
10 #include "../../include/javascript/JS_Value.h"
11 #include "../../include/javascript/console.h"
12 #include "../../include/javascript/JS_EventHandler.h"
13 #include "../../include/javascript/JS_Context.h"
14
15 /* ------------------------ console ------------------------ */
16
17 BEGIN_JS_STATIC_CONST(CJS_Console)
18 END_JS_STATIC_CONST()
19
20 BEGIN_JS_STATIC_PROP(CJS_Console)
21 END_JS_STATIC_PROP()
22
23 BEGIN_JS_STATIC_METHOD(CJS_Console)
24 JS_STATIC_METHOD_ENTRY(clear)
25 JS_STATIC_METHOD_ENTRY(hide)
26 JS_STATIC_METHOD_ENTRY(println)
27 JS_STATIC_METHOD_ENTRY(show)
28 END_JS_STATIC_METHOD()
29
30 IMPLEMENT_JS_CLASS(CJS_Console, console)
31
32 console::console(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
33
34 console::~console() {}
35
36 FX_BOOL console::clear(IFXJS_Context* cc,
37                        const CJS_Parameters& params,
38                        CJS_Value& vRet,
39                        CFX_WideString& sError) {
40   return TRUE;
41 }
42
43 FX_BOOL console::hide(IFXJS_Context* cc,
44                       const CJS_Parameters& params,
45                       CJS_Value& vRet,
46                       CFX_WideString& sError) {
47   return TRUE;
48 }
49
50 FX_BOOL console::println(IFXJS_Context* cc,
51                          const CJS_Parameters& params,
52                          CJS_Value& vRet,
53                          CFX_WideString& sError) {
54   if (params.size() < 1) {
55     return FALSE;
56   }
57   return TRUE;
58 }
59
60 FX_BOOL console::show(IFXJS_Context* cc,
61                       const CJS_Parameters& params,
62                       CJS_Value& vRet,
63                       CFX_WideString& sError) {
64   return TRUE;
65 }