diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-07 22:33:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-07 22:33:43 +0000 |
commit | 93bb725b62f9779534c9444c1e1319fe8c28912e (patch) | |
tree | af0c758c1129dc076cbf67a89f1c23e4703e02bd /fxjs/cjx_eventpseudomodel.cpp | |
parent | ce6979f8d064507300fe0b3a856687fb958c9a5c (diff) | |
download | pdfium-93bb725b62f9779534c9444c1e1319fe8c28912e.tar.xz |
[xfa] Move JS method information to files.chromium/3288
This CL moves the XFA SOM JS Method information out of the c-array and
into individual CJX class files.
Change-Id: I401046a06aacaf1f04e5a51eb899e479de012e15
Reviewed-on: https://pdfium-review.googlesource.com/20450
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjx_eventpseudomodel.cpp')
-rw-r--r-- | fxjs/cjx_eventpseudomodel.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fxjs/cjx_eventpseudomodel.cpp b/fxjs/cjx_eventpseudomodel.cpp index edadb5dafe..f78890bc9f 100644 --- a/fxjs/cjx_eventpseudomodel.cpp +++ b/fxjs/cjx_eventpseudomodel.cpp @@ -42,8 +42,15 @@ void BooleanProperty(CFXJSE_Value* pValue, bool& bValue, bool bSetting) { } // namespace +const CJX_MethodSpec CJX_EventPseudoModel::MethodSpecs[] = { + {"emit", emit_static}, + {"reset", reset_static}, + {"", nullptr}}; + CJX_EventPseudoModel::CJX_EventPseudoModel(CScript_EventPseudoModel* model) - : CJX_Object(model) {} + : CJX_Object(model) { + DefineMethods(MethodSpecs); +} CJX_EventPseudoModel::~CJX_EventPseudoModel() {} @@ -143,7 +150,7 @@ void CJX_EventPseudoModel::Target(CFXJSE_Value* pValue, Property(pValue, XFA_Event::Target, bSetting); } -void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) { +void CJX_EventPseudoModel::emit(CFXJSE_Arguments* pArguments) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) return; @@ -163,7 +170,7 @@ void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) { pWidgetHandler->ProcessEvent(pEventParam->m_pTarget, pEventParam); } -void CJX_EventPseudoModel::Reset(CFXJSE_Arguments* pArguments) { +void CJX_EventPseudoModel::reset(CFXJSE_Arguments* pArguments) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) return; |