Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjs_console.cpp
Go to the documentation of this file.
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#include "fxjs/cjs_console.h"
8
9#include <vector>
10
11#include "fxjs/cjs_event_context.h"
12#include "fxjs/cjs_object.h"
13#include "fxjs/js_define.h"
14#include "third_party/base/containers/span.h"
15
16const JSMethodSpec CJS_Console::MethodSpecs[] = {{"clear", clear_static},
17 {"hide", hide_static},
18 {"println", println_static},
19 {"show", show_static}};
20
21uint32_t CJS_Console::ObjDefnID = 0;
22const char CJS_Console::kName[] = "console";
23
24// static
25uint32_t CJS_Console::GetObjDefnID() {
26 return ObjDefnID;
27}
28
29// static
30void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine) {
31 ObjDefnID = pEngine->DefineObj(CJS_Console::kName, FXJSOBJTYPE_STATIC,
32 JSConstructor<CJS_Console>, JSDestructor);
33 DefineMethods(pEngine, ObjDefnID, MethodSpecs);
34}
35
36CJS_Console::CJS_Console(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
37 : CJS_Object(pObject, pRuntime) {}
38
39CJS_Console::~CJS_Console() = default;
40
41CJS_Result CJS_Console::clear(CJS_Runtime* pRuntime,
42 pdfium::span<v8::Local<v8::Value>> params) {
44}
45
46CJS_Result CJS_Console::hide(CJS_Runtime* pRuntime,
47 pdfium::span<v8::Local<v8::Value>> params) {
49}
50
51CJS_Result CJS_Console::println(CJS_Runtime* pRuntime,
52 pdfium::span<v8::Local<v8::Value>> params) {
54}
55
56CJS_Result CJS_Console::show(CJS_Runtime* pRuntime,
57 pdfium::span<v8::Local<v8::Value>> params) {
59}
@ FXJSOBJTYPE_STATIC
static uint32_t GetObjDefnID()
~CJS_Console() override
CJS_Console(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
static void DefineJSObjects(CFXJS_Engine *pEngine)
static void DefineMethods(CFXJS_Engine *pEngine, uint32_t nObjDefnID, pdfium::span< const JSMethodSpec > consts)
static CJS_Result Success()
Definition cjs_result.h:27