summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/global.h
AgeCommit message (Collapse)Author
2017-10-26Move global.{h|cpp} to match classdan sinclair
This CL moves global.{h|cpp} to cjs_global.{h|cpp} to match the internal class name. Change-Id: I58a0dfcb36ee35320a0ad0d134a544e615dc93bf Reviewed-on: https://pdfium-review.googlesource.com/16870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-23Cleaning up JS macrosDan Sinclair
This Cl moves JS_Defines macros with only one usage to be inline. Moves macros to where they're used and expands as needed. Change-Id: I7296aa0b7a815ef8f2a80dd813e7466056fe37af Reviewed-on: https://pdfium-review.googlesource.com/16510 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-23Remove CJS_PropValueDan Sinclair
This CL removes the CJS_PropValue class and uses CJS_Value directly. The various Set methods have been moved to CJS_Value and the runtime provided as needed. Change-Id: Ib5d3b9efc9b6cf8182be8f19af98599379c3d7db Reviewed-on: https://pdfium-review.googlesource.com/16431 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-19Refactoring JS Callbacks.dan sinclair
This CL updates the fpdfsdk/javascript callbacks to have explicit get/set methods instead of one method which worked differently depending on the mode. This allows better ownership of the passed in params, (get takes a * and set takes a const&). The Value object was changed to have To* and Set methods to make the code clearer compared to the operator<< and operator>> overloading. Bug: Change-Id: Id6ff20a4e3252adfd0a78b643e50b9f095085018 Reviewed-on: https://pdfium-review.googlesource.com/16330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-04-18Use unique_ptr in JSGlobalAlternate::m_MapGlobalTom Sepez
Change-Id: Iffc3b8654e8c780260f7b58f04b57ae147fce379 Reviewed-on: https://pdfium-review.googlesource.com/4252 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-14Replace FX_CHAR and FX_WCHAR with underlying types.Dan Sinclair
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-23Observe all formfill environment pointer in JS objects.Tom Sepez
Preventitve measure to decouple JS object lifetimes from C++ objects. Change-Id: I964a52590fcd0bfc26ac6055a7daf8aa33d455f3 Reviewed-on: https://pdfium-review.googlesource.com/2828 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-02-21Pass CJS_Runtime to JS callbacks.Tom Sepez
This is much more convenient, since only a fraction of them need an IJS_EventContext, which can be obtained from the CJS_Runtime. Make GetCurrentEventContext() specific to CJS_Runtime, and return the concrete type. This saves a lot of casting. Change-Id: If79a3bcbf44de513f3caace153099234cc313d47 Reviewed-on: https://pdfium-review.googlesource.com/2793 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-02-16Rename IJS_Context to IJS_EventContext.Tom Sepez
Prevents confusion with v8::Context, which is wrapped by a different IJS_ class. Change-Id: Iff75809e65015c0f810294de1f0d8ecf963150a3 Reviewed-on: https://pdfium-review.googlesource.com/2751 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2016-11-21Fixup lint flags.Dan Sinclair
The -build/include setting was masking out build/include_what_you_use. This CL restores them, fixes any build errors, and adds NOLINT as needed. As well, the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd. lint cleanups Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f Reviewed-on: https://pdfium-review.googlesource.com/2030 Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-02Remove FX_BOOL from fpdfsdk.tsepez
Review-Url: https://codereview.chromium.org/2453683011
2016-10-12Cleanup env variable namesdsinclair
This CL cleans up any old m_pEnv variables to be correctly named m_pFormFillEnv. Review-Url: https://codereview.chromium.org/2412523002
2016-10-05Rename CPDFSDK_Environment to CPDFSDK_FormfillEnvironmentdsinclair
Rename CPDFSDK_Environment to make it explicit that this is part of the formfill system. Review-Url: https://codereview.chromium.org/2391313002
2016-09-22Rename App to Env where needed.dsinclair
More instances of CPDFSDK_Environment being called m_pApp in the code. Renamed to m_pEnv to be clear that it's the environment not an app object. Review-Url: https://codereview.chromium.org/2354413002
2016-09-14Rename CPDFDoc_Environment to CPDFSDK_Environmentdsinclair
CPDFDoc_Environment does not fit with the general naming scheme of the rest of the files in fpdfsdk. This CL updates the naming to CPDFSDK_Environment to better fit with the surrounding files. Review-Url: https://codereview.chromium.org/2333413003
2016-07-20Clean up singleton implementationweili
Move the singleton instances into their namespaces, and use get()/getInstance() for uniform accesses. Review-Url: https://codereview.chromium.org/2154843002
2016-06-15Make code compile with clang_use_chrome_plugin (part IV)weili
This change mainly contains files in fpdfsdk/ directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002
2016-04-11Pass CFX_ByteStrings rather than raw ptrs to JS_GlobalData.tsepez
Helps to avoid re-allocating strings when the caller already has one allocated. Review URL: https://codereview.chromium.org/1876203002
2016-03-14Move fpdfsdk/src up to fpdfsdk/.Dan Sinclair
This CL moves the files in fpdfsdk/src/ up one level to fpdfsdk/ and fixes up the include paths, include guards and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1799773002 .