Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: fpdfsdk/include/javascript/IJavaScript.h

Issue 1394993006: Merge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/javascript/IJavaScript.h
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index f78ee527933d75555168474691337846e00eb781..c8962bd343c53b496ba2a0a7cf089b0af36ffe38 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -17,10 +17,11 @@ class CPDFSDK_Document;
class CPDF_Bookmark;
class CPDF_FormField;
+// Records the details of an event and triggers JS execution for it.
class IJS_Context {
public:
virtual FX_BOOL RunScript(const CFX_WideString& script,
- CFX_WideString& info) = 0;
+ CFX_WideString* info) = 0;
virtual void OnApp_Init() = 0;
@@ -132,6 +133,7 @@ class IJS_Context {
virtual ~IJS_Context() {}
};
+// Owns the FJXS objects needed to actually execute JS.
class IJS_Runtime {
public:
static void Initialize(unsigned int slot, void* isolate);
@@ -144,6 +146,9 @@ class IJS_Runtime {
virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
virtual CPDFSDK_Document* GetReaderDocument() = 0;
+ virtual int Execute(IJS_Context* cc,
+ const wchar_t* script,
+ CFX_WideString* info) = 0;
virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
FXJSE_HVALUE hValue) = 0;
« no previous file with comments | « no previous file | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698