#include "fxjs/cjs_app.h"
#include <stdint.h>
#include <algorithm>
#include <utility>
#include "core/fxcrt/fixed_size_data_vector.h"
#include "core/fxcrt/span.h"
#include "core/fxcrt/stl_util.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interactiveform.h"
#include "fxjs/cjs_document.h"
#include "fxjs/cjs_timerobj.h"
#include "fxjs/global_timer.h"
#include "fxjs/ijs_event_context.h"
#include "fxjs/js_resources.h"
#include "v8/include/v8-container.h"
namespace {
constexpr wchar_t kStrViewerType[] = …;
constexpr wchar_t kStrViewerVariation[] = …;
constexpr wchar_t kStrPlatform[] = …;
constexpr wchar_t kStrLanguage[] = …;
constexpr int kNumViewerVersion = …;
constexpr int kNumViewerVersionXfa = …;
constexpr int kNumFormsVersion = …;
}
const JSPropertySpec CJS_App::PropertySpecs[] = …;
const JSMethodSpec CJS_App::MethodSpecs[] = …;
uint32_t CJS_App::ObjDefnID = …;
const char CJS_App::kName[] = …;
uint32_t CJS_App::GetObjDefnID() { … }
void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine) { … }
CJS_App::CJS_App(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
: … { … }
CJS_App::~CJS_App() = default;
CJS_Result CJS_App::get_active_docs(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_active_docs(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_calculate(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_calculate(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_forms_version(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_forms_version(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_viewer_type(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_viewer_type(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_viewer_variation(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_viewer_variation(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_viewer_version(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_viewer_version(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_platform(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_platform(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_language(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_language(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::newFDF(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::openFDF(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::alert(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::beep(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::findComponent(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::popUpMenuEx(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::get_fs(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_fs(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::setInterval(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::setTimeOut(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::clearTimeOut(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::clearInterval(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
void CJS_App::ClearTimerCommon(CJS_Runtime* pRuntime,
v8::Local<v8::Value> param) { … }
CJS_Result CJS_App::execMenuItem(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
void CJS_App::TimerProc(GlobalTimer* pTimer) { … }
void CJS_App::CancelProc(GlobalTimer* pTimer) { … }
void CJS_App::RunJsScript(CJS_Runtime* pRuntime, const WideString& wsScript) { … }
CJS_Result CJS_App::goBack(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::goForward(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::mailMsg(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::launchURL(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::get_runtime_highlight(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_runtime_highlight(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::get_fullscreen(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_fullscreen(CJS_Runtime* pRuntime,
v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::popUpMenu(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::browseForDoc(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
WideString CJS_App::SysPathToPDFPath(const WideString& sOldPath) { … }
CJS_Result CJS_App::newDoc(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::openDoc(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::response(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }
CJS_Result CJS_App::get_media(CJS_Runtime* pRuntime) { … }
CJS_Result CJS_App::set_media(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { … }
CJS_Result CJS_App::execDialog(CJS_Runtime* pRuntime,
pdfium::span<v8::Local<v8::Value>> params) { … }