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