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

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

Issue 2354413002: Rename App to Env where needed. (Closed)
Patch Set: Rebase to master Created 4 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/javascript/cjs_context.cpp ('k') | fpdfsdk/javascript/cjs_runtime.cpp » ('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_JAVASCRIPT_CJS_RUNTIME_H_ 7 #ifndef FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_
8 #define FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ 8 #define FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 24 matching lines...) Expand all
35 35
36 // IJS_Runtime 36 // IJS_Runtime
37 IJS_Context* NewContext() override; 37 IJS_Context* NewContext() override;
38 void ReleaseContext(IJS_Context* pContext) override; 38 void ReleaseContext(IJS_Context* pContext) override;
39 IJS_Context* GetCurrentContext() override; 39 IJS_Context* GetCurrentContext() override;
40 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override; 40 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override;
41 CPDFSDK_Document* GetReaderDocument() override; 41 CPDFSDK_Document* GetReaderDocument() override;
42 int ExecuteScript(const CFX_WideString& script, 42 int ExecuteScript(const CFX_WideString& script,
43 CFX_WideString* info) override; 43 CFX_WideString* info) override;
44 44
45 CPDFSDK_Environment* GetReaderApp() const { return m_pApp; } 45 CPDFSDK_Environment* GetReaderEnv() const { return m_pEnv; }
46 46
47 // Returns true if the event isn't already found in the set. 47 // Returns true if the event isn't already found in the set.
48 bool AddEventToSet(const FieldEvent& event); 48 bool AddEventToSet(const FieldEvent& event);
49 void RemoveEventFromSet(const FieldEvent& event); 49 void RemoveEventFromSet(const FieldEvent& event);
50 50
51 void BeginBlock() { m_bBlocking = TRUE; } 51 void BeginBlock() { m_bBlocking = TRUE; }
52 void EndBlock() { m_bBlocking = FALSE; } 52 void EndBlock() { m_bBlocking = FALSE; }
53 FX_BOOL IsBlocking() const { return m_bBlocking; } 53 FX_BOOL IsBlocking() const { return m_bBlocking; }
54 54
55 #ifdef PDF_ENABLE_XFA 55 #ifdef PDF_ENABLE_XFA
56 FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name, 56 FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name,
57 CFXJSE_Value* pValue) override; 57 CFXJSE_Value* pValue) override;
58 FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name, 58 FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name,
59 CFXJSE_Value* pValue) override; 59 CFXJSE_Value* pValue) override;
60 #endif // PDF_ENABLE_XFA 60 #endif // PDF_ENABLE_XFA
61 61
62 private: 62 private:
63 void DefineJSObjects(); 63 void DefineJSObjects();
64 64
65 std::vector<std::unique_ptr<CJS_Context>> m_ContextArray; 65 std::vector<std::unique_ptr<CJS_Context>> m_ContextArray;
66 CPDFSDK_Environment* const m_pApp; 66 CPDFSDK_Environment* const m_pEnv;
67 CPDFSDK_Document* m_pDocument; 67 CPDFSDK_Document* m_pDocument;
68 bool m_bBlocking; 68 bool m_bBlocking;
69 bool m_isolateManaged; 69 bool m_isolateManaged;
70 std::set<FieldEvent> m_FieldEventSet; 70 std::set<FieldEvent> m_FieldEventSet;
71 }; 71 };
72 72
73 #endif // FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ 73 #endif // FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/cjs_context.cpp ('k') | fpdfsdk/javascript/cjs_runtime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698