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

Side by Side Diff: fpdfsdk/javascript/ijs_runtime.h

Issue 1847583004: Move the fpdfsdk/include/javascript folder (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/javascript/ijs_context.h ('k') | fpdfsdk/javascript/report.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
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 #ifndef FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_
8 #define FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_
9
10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h"
12
13 #ifdef PDF_ENABLE_XFA
14 #include "xfa/fxjse/include/fxjse.h"
15 #endif // PDF_ENABLE_XFA
16
17 class CPDFDoc_Environment;
18 class CPDFSDK_Document;
19 class IJS_Context;
20
21 // Owns the FJXS objects needed to actually execute JS.
22 class IJS_Runtime {
23 public:
24 static void Initialize(unsigned int slot, void* isolate);
25 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv);
26 virtual ~IJS_Runtime() {}
27
28 virtual IJS_Context* NewContext() = 0;
29 virtual void ReleaseContext(IJS_Context* pContext) = 0;
30 virtual IJS_Context* GetCurrentContext() = 0;
31 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
32 virtual CPDFSDK_Document* GetReaderDocument() = 0;
33 virtual int Execute(IJS_Context* cc,
34 const wchar_t* script,
35 CFX_WideString* info) = 0;
36
37 #ifdef PDF_ENABLE_XFA
38 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
39 FXJSE_HVALUE hValue) = 0;
40 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name,
41 FXJSE_HVALUE hValue) = 0;
42 #endif // PDF_ENABLE_XFA
43
44 protected:
45 IJS_Runtime() {}
46 };
47
48 #endif // FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/ijs_context.h ('k') | fpdfsdk/javascript/report.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698