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

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

Issue 897973002: Initialize V8 outside of PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | samples/pdfium_test.cc » ('J')
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 _IJAVASCRIPT_H_ 7 #ifndef _IJAVASCRIPT_H_
8 #define _IJAVASCRIPT_H_ 8 #define _IJAVASCRIPT_H_
9 9
10 namespace v8 {
11 class Platform;
12 }
13
14 class IFXJS_Context 10 class IFXJS_Context
15 { 11 {
16 public: 12 public:
17 virtual ~IFXJS_Context() { } 13 virtual ~IFXJS_Context() { }
18 virtual FX_BOOL Compile(const CFX_WideString& sc ript, CFX_WideString& info) = 0; 14 virtual FX_BOOL Compile(const CFX_WideString& sc ript, CFX_WideString& info) = 0;
19 virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0; 15 virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
20 16
21 virtual void OnApp_Init() = 0; 17 virtual void OnApp_Init() = 0;
22 18
23 virtual void OnDoc_Open(CPDFSDK_Document* pDo c, const CFX_WideString& strTargetName) = 0; 19 virtual void OnDoc_Open(CPDFSDK_Document* pDo c, const CFX_WideString& strTargetName) = 0;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 protected: 88 protected:
93 ~IFXJS_Runtime() { } 89 ~IFXJS_Runtime() { }
94 }; 90 };
95 91
96 class CPDFDoc_Environment; 92 class CPDFDoc_Environment;
97 class CJS_GlobalData; 93 class CJS_GlobalData;
98 94
99 class CJS_RuntimeFactory 95 class CJS_RuntimeFactory
100 { 96 {
101 public: 97 public:
102 » CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlo balDataCount(0),m_platform(NULL) {} 98 » CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlo balDataCount(0) {}
103 ~CJS_RuntimeFactory(); 99 ~CJS_RuntimeFactory();
104 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Env ironment* pApp); 100 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Env ironment* pApp);
105 void DeleteJSRuntime( IFXJS_Runtime* pRuntime); 101 void DeleteJSRuntime( IFXJS_Runtime* pRuntime);
106 void AddRef(); 102 void AddRef();
107 void Release(); 103 void Release();
108 104
109 CJS_GlobalData* NewGlobalData(CPDFDoc_En vironment* pApp); 105 CJS_GlobalData* NewGlobalData(CPDFDoc_En vironment* pApp);
110 void ReleaseGlobalDat a(); 106 void ReleaseGlobalDat a();
111 private: 107 private:
112 FX_BOOL m_bInit; 108 FX_BOOL m_bInit;
113 int m_nRef; 109 int m_nRef;
114 CJS_GlobalData* m_pGlobalData; 110 CJS_GlobalData* m_pGlobalData;
115 FX_INT32 m_nGlobalDataCou nt; 111 FX_INT32 m_nGlobalDataCou nt;
116 v8::Platform* m_platform;
117 }; 112 };
118 113
119 #endif //_IJAVASCRIPT_H_ 114 #endif //_IJAVASCRIPT_H_
120 115
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | samples/pdfium_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698