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

Side by Side Diff: fpdfsdk/include/javascript/IJavaScript.h

Issue 1395713002: Merge to XFA: Rename IFXJS_Runtime and IFXJS_Context to IJS_. (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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
9 9
10 #include "../../../core/include/fxcrt/fx_string.h" 10 #include "../../../core/include/fxcrt/fx_string.h"
11 #include "../../../core/include/fxcrt/fx_system.h" 11 #include "../../../core/include/fxcrt/fx_system.h"
12 #include "../../../xfa/include/fxjse/fxjse.h" 12 #include "../../../xfa/include/fxjse/fxjse.h"
13 13
14 class CPDFDoc_Environment; 14 class CPDFDoc_Environment;
15 class CPDFSDK_Annot; 15 class CPDFSDK_Annot;
16 class CPDFSDK_Document; 16 class CPDFSDK_Document;
17 class CPDF_Bookmark; 17 class CPDF_Bookmark;
18 class CPDF_FormField; 18 class CPDF_FormField;
19 19
20 class IFXJS_Context { 20 class IJS_Context {
21 public: 21 public:
22 virtual FX_BOOL RunScript(const CFX_WideString& script, 22 virtual FX_BOOL RunScript(const CFX_WideString& script,
23 CFX_WideString& info) = 0; 23 CFX_WideString& info) = 0;
24 24
25 virtual void OnApp_Init() = 0; 25 virtual void OnApp_Init() = 0;
26 26
27 virtual void OnDoc_Open(CPDFSDK_Document* pDoc, 27 virtual void OnDoc_Open(CPDFSDK_Document* pDoc,
28 const CFX_WideString& strTargetName) = 0; 28 const CFX_WideString& strTargetName) = 0;
29 virtual void OnDoc_WillPrint(CPDFSDK_Document* pDoc) = 0; 29 virtual void OnDoc_WillPrint(CPDFSDK_Document* pDoc) = 0;
30 virtual void OnDoc_DidPrint(CPDFSDK_Document* pDoc) = 0; 30 virtual void OnDoc_DidPrint(CPDFSDK_Document* pDoc) = 0;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 virtual void OnMenu_Exec(CPDFSDK_Document* pTarget, 123 virtual void OnMenu_Exec(CPDFSDK_Document* pTarget,
124 const CFX_WideString&) = 0; 124 const CFX_WideString&) = 0;
125 virtual void OnBatchExec(CPDFSDK_Document* pTarget) = 0; 125 virtual void OnBatchExec(CPDFSDK_Document* pTarget) = 0;
126 virtual void OnConsole_Exec() = 0; 126 virtual void OnConsole_Exec() = 0;
127 virtual void OnExternal_Exec() = 0; 127 virtual void OnExternal_Exec() = 0;
128 128
129 virtual void EnableMessageBox(FX_BOOL bEnable) = 0; 129 virtual void EnableMessageBox(FX_BOOL bEnable) = 0;
130 130
131 protected: 131 protected:
132 virtual ~IFXJS_Context() {} 132 virtual ~IJS_Context() {}
133 }; 133 };
134 134
135 class IFXJS_Runtime { 135 class IJS_Runtime {
136 public: 136 public:
137 static IFXJS_Runtime* Create(CPDFDoc_Environment* pEnv); 137 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv);
138 virtual ~IFXJS_Runtime() {} 138 virtual ~IJS_Runtime() {}
139 139
140 virtual IFXJS_Context* NewContext() = 0; 140 virtual IJS_Context* NewContext() = 0;
141 virtual void ReleaseContext(IFXJS_Context* pContext) = 0; 141 virtual void ReleaseContext(IJS_Context* pContext) = 0;
142 virtual IFXJS_Context* GetCurrentContext() = 0; 142 virtual IJS_Context* GetCurrentContext() = 0;
143 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; 143 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
144 144
145 virtual CPDFSDK_Document* GetReaderDocument() = 0; 145 virtual CPDFSDK_Document* GetReaderDocument() = 0;
146 146
147 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, 147 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
148 FXJSE_HVALUE hValue) = 0; 148 FXJSE_HVALUE hValue) = 0;
149 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, 149 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name,
150 FXJSE_HVALUE hValue) = 0; 150 FXJSE_HVALUE hValue) = 0;
151 151
152 protected: 152 protected:
153 IFXJS_Runtime() {} 153 IJS_Runtime() {}
154 }; 154 };
155 155
156 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 156 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698