| 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_INCLUDE_JAVASCRIPT_GLOBAL_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ |
| 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ |
| 9 | 9 |
| 10 #include "JS_Define.h" | 10 #include "JS_Define.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 bool bData; | 29 bool bData; |
| 30 CFX_ByteString sData; | 30 CFX_ByteString sData; |
| 31 v8::Global<v8::Object> pData; | 31 v8::Global<v8::Object> pData; |
| 32 bool bPersistent; | 32 bool bPersistent; |
| 33 bool bDeleted; | 33 bool bDeleted; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class global_alternate : public CJS_EmbedObj { | 36 class global_alternate : public CJS_EmbedObj { |
| 37 public: | 37 public: |
| 38 global_alternate(CJS_Object* pJSObject); | 38 global_alternate(CJS_Object* pJSObject); |
| 39 virtual ~global_alternate(); | 39 ~global_alternate() override; |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 FX_BOOL setPersistent(IFXJS_Context* cc, | 42 FX_BOOL setPersistent(IFXJS_Context* cc, |
| 43 const CJS_Parameters& params, | 43 const CJS_Parameters& params, |
| 44 CJS_Value& vRet, | 44 CJS_Value& vRet, |
| 45 CFX_WideString& sError); | 45 CFX_WideString& sError); |
| 46 | 46 |
| 47 public: | 47 public: |
| 48 FX_BOOL QueryProperty(const FX_WCHAR* propname); | 48 FX_BOOL QueryProperty(const FX_WCHAR* propname); |
| 49 FX_BOOL DoProperty(IFXJS_Context* cc, | 49 FX_BOOL DoProperty(IFXJS_Context* cc, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 CFX_MapByteStringToPtr m_mapGlobal; | 76 CFX_MapByteStringToPtr m_mapGlobal; |
| 77 CFX_WideString m_sFilePath; | 77 CFX_WideString m_sFilePath; |
| 78 CJS_GlobalData* m_pGlobalData; | 78 CJS_GlobalData* m_pGlobalData; |
| 79 CPDFDoc_Environment* m_pApp; | 79 CPDFDoc_Environment* m_pApp; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 class CJS_Global : public CJS_Object { | 82 class CJS_Global : public CJS_Object { |
| 83 public: | 83 public: |
| 84 CJS_Global(JSFXObject pObject) : CJS_Object(pObject){}; | 84 explicit CJS_Global(JSFXObject pObject) : CJS_Object(pObject) {} |
| 85 virtual ~CJS_Global(void){}; | 85 ~CJS_Global() override {} |
| 86 | 86 |
| 87 virtual FX_BOOL InitInstance(IFXJS_Context* cc); | 87 // CJS_Object |
| 88 FX_BOOL InitInstance(IFXJS_Context* cc) override; |
| 88 | 89 |
| 89 DECLARE_SPECIAL_JS_CLASS(CJS_Global); | 90 DECLARE_SPECIAL_JS_CLASS(CJS_Global); |
| 90 | 91 |
| 91 JS_SPECIAL_STATIC_METHOD(setPersistent, global_alternate, global); | 92 JS_SPECIAL_STATIC_METHOD(setPersistent, global_alternate, global); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ | 95 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ |
| OLD | NEW |