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
fxjse.cpp
Go to the documentation of this file.
1
// Copyright 2018 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/xfa/fxjse.h"
8
9
#
include
"fxjs/fxv8.h"
10
#
include
"fxjs/xfa/cfxjse_context.h"
11
#
include
"v8/include/v8-isolate.h"
12
#
include
"v8/include/v8-object.h"
13
#
include
"v8/include/v8-template.h"
14
15
namespace
pdfium::
fxjse
{
16
17
const
char
kFuncTag
[] =
"function descriptor tag"
;
18
const
char
kClassTag
[] =
"class descriptor tag"
;
19
20
}
// namespace pdfium::fxjse
21
22
// static
23
CFXJSE_HostObject
*
CFXJSE_HostObject
::FromV8(v8::Local<v8::Value> arg) {
24
if
(!fxv8::IsObject(arg))
25
return
nullptr
;
26
27
return
FXJSE_RetrieveObjectBinding(arg.As<v8::Object>());
28
}
29
30
CFXJSE_HostObject
::
CFXJSE_HostObject
() =
default
;
31
32
CFXJSE_HostObject
::~
CFXJSE_HostObject
() =
default
;
33
34
CFXJSE_FormCalcContext*
CFXJSE_HostObject
::
AsFormCalcContext
() {
35
return
nullptr
;
36
}
37
38
CJX_Object
*
CFXJSE_HostObject
::
AsCJXObject
() {
39
return
nullptr
;
40
}
41
42
v8::Local<v8::Object>
CFXJSE_HostObject
::NewBoundV8Object(
43
v8::Isolate* pIsolate,
44
v8::Local<v8::FunctionTemplate> tmpl) {
45
v8::Local<v8::Object> hObject =
46
tmpl->InstanceTemplate()
47
->NewInstance(pIsolate->GetCurrentContext())
48
.ToLocalChecked();
49
FXJSE_UpdateObjectBinding(hObject,
this
);
50
return
hObject;
51
}
CFXJSE_HostObject
Definition
fxjse.h:38
CFXJSE_HostObject::AsCJXObject
virtual CJX_Object * AsCJXObject()
Definition
fxjse.cpp:38
CFXJSE_HostObject::AsFormCalcContext
virtual CFXJSE_FormCalcContext * AsFormCalcContext()
Definition
fxjse.cpp:34
CFXJSE_HostObject::CFXJSE_HostObject
CFXJSE_HostObject()
CFXJSE_HostObject::~CFXJSE_HostObject
virtual ~CFXJSE_HostObject()
CJX_Object
Definition
cjx_object.h:46
pdfium::fxjse
Definition
fxjse.h:17
pdfium::fxjse::kClassTag
const char kClassTag[]
Definition
fxjse.cpp:18
pdfium::fxjse::kFuncTag
const char kFuncTag[]
Definition
fxjse.cpp:17
qtwebengine
src
3rdparty
chromium
third_party
pdfium
fxjs
xfa
fxjse.cpp
Generated on Sat Sep 21 2024 00:59:57 for Qt by
1.12.0