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

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

Issue 374123002: Hook up the default v8::Platform implementation to pdfium (Closed) Base URL: https://pdfium.googlesource.com/pdfium/@master
Patch Set: updates Created 6 years, 5 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
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 _IJAVASCRIPT_H_ 7 #ifndef _IJAVASCRIPT_H_
8 #define _IJAVASCRIPT_H_ 8 #define _IJAVASCRIPT_H_
9 9
10 namespace v8 {
11 class Platform;
12 }
13
10 class IFXJS_Context 14 class IFXJS_Context
11 { 15 {
12 public: 16 public:
13 virtual FX_BOOL Compile(const CFX_WideString& sc ript, CFX_WideString& info) = 0; 17 virtual FX_BOOL Compile(const CFX_WideString& sc ript, CFX_WideString& info) = 0;
14 virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0; 18 virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
15 19
16 public: 20 public:
17 virtual void OnApp_Init() = 0; 21 virtual void OnApp_Init() = 0;
18 22
19 virtual void OnDoc_Open(CPDFSDK_Document* pDo c, const CFX_WideString& strTargetName) = 0; 23 virtual void OnDoc_Open(CPDFSDK_Document* pDo c, const CFX_WideString& strTargetName) = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void Enter() = 0; 89 virtual void Enter() = 0;
86 virtual FX_BOOL IsEntered() = 0; 90 virtual FX_BOOL IsEntered() = 0;
87 }; 91 };
88 92
89 class CPDFDoc_Environment; 93 class CPDFDoc_Environment;
90 class CJS_GlobalData; 94 class CJS_GlobalData;
91 95
92 class CJS_RuntimeFactory 96 class CJS_RuntimeFactory
93 { 97 {
94 public: 98 public:
95 » CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlo balDataCount(0) {} 99 » CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlo balDataCount(0),m_platform(NULL) {}
96 ~CJS_RuntimeFactory(); 100 ~CJS_RuntimeFactory();
97 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Env ironment* pApp); 101 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Env ironment* pApp);
98 void DeleteJSRuntime( IFXJS_Runtime* pRuntime); 102 void DeleteJSRuntime( IFXJS_Runtime* pRuntime);
99 void AddRef(); 103 void AddRef();
100 void Release(); 104 void Release();
101 105
102 CJS_GlobalData* NewGlobalData(CPDFDoc_En vironment* pApp); 106 CJS_GlobalData* NewGlobalData(CPDFDoc_En vironment* pApp);
103 void ReleaseGlobalDat a(); 107 void ReleaseGlobalDat a();
104 private: 108 private:
105 FX_BOOL m_bInit; 109 FX_BOOL m_bInit;
106 int m_nRef; 110 int m_nRef;
107 CJS_GlobalData* m_pGlobalData; 111 CJS_GlobalData* m_pGlobalData;
108 FX_INT32 m_nGlobalDataCou nt; 112 FX_INT32 m_nGlobalDataCou nt;
113 v8::Platform* m_platform;
109 }; 114 };
110 115
111 #endif //_IJAVASCRIPT_H_ 116 #endif //_IJAVASCRIPT_H_
112 117
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698