OLD | NEW |
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_GLOBAL_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_GLOBAL_H_ |
8 #define FPDFSDK_JAVASCRIPT_GLOBAL_H_ | 8 #define FPDFSDK_JAVASCRIPT_GLOBAL_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 CFX_WideString& sError); | 52 CFX_WideString& sError); |
53 FX_BOOL DelProperty(IJS_Context* cc, | 53 FX_BOOL DelProperty(IJS_Context* cc, |
54 const FX_WCHAR* propname, | 54 const FX_WCHAR* propname, |
55 CFX_WideString& sError); | 55 CFX_WideString& sError); |
56 void Initial(CPDFDoc_Environment* pApp); | 56 void Initial(CPDFDoc_Environment* pApp); |
57 | 57 |
58 private: | 58 private: |
59 void UpdateGlobalPersistentVariables(); | 59 void UpdateGlobalPersistentVariables(); |
60 void CommitGlobalPersisitentVariables(IJS_Context* cc); | 60 void CommitGlobalPersisitentVariables(IJS_Context* cc); |
61 void DestroyGlobalPersisitentVariables(); | 61 void DestroyGlobalPersisitentVariables(); |
62 FX_BOOL SetGlobalVariables(const FX_CHAR* propname, | 62 FX_BOOL SetGlobalVariables(const CFX_ByteString& propname, |
63 int nType, | 63 int nType, |
64 double dData, | 64 double dData, |
65 bool bData, | 65 bool bData, |
66 const CFX_ByteString& sData, | 66 const CFX_ByteString& sData, |
67 v8::Local<v8::Object> pData, | 67 v8::Local<v8::Object> pData, |
68 bool bDefaultPersistent); | 68 bool bDefaultPersistent); |
69 void ObjectToArray(IJS_Context* cc, | 69 void ObjectToArray(IJS_Context* cc, |
70 v8::Local<v8::Object> pObj, | 70 v8::Local<v8::Object> pObj, |
71 CJS_GlobalVariableArray& array); | 71 CJS_GlobalVariableArray& array); |
72 void PutObjectProperty(v8::Local<v8::Object> obj, CJS_KeyValue* pData); | 72 void PutObjectProperty(v8::Local<v8::Object> obj, CJS_KeyValue* pData); |
(...skipping 10 matching lines...) Expand all Loading... |
83 ~CJS_Global() override {} | 83 ~CJS_Global() override {} |
84 | 84 |
85 // CJS_Object | 85 // CJS_Object |
86 void InitInstance(IJS_Runtime* pIRuntime) override; | 86 void InitInstance(IJS_Runtime* pIRuntime) override; |
87 | 87 |
88 DECLARE_SPECIAL_JS_CLASS(); | 88 DECLARE_SPECIAL_JS_CLASS(); |
89 JS_SPECIAL_STATIC_METHOD(setPersistent, JSGlobalAlternate, global); | 89 JS_SPECIAL_STATIC_METHOD(setPersistent, JSGlobalAlternate, global); |
90 }; | 90 }; |
91 | 91 |
92 #endif // FPDFSDK_JAVASCRIPT_GLOBAL_H_ | 92 #endif // FPDFSDK_JAVASCRIPT_GLOBAL_H_ |
OLD | NEW |