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

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

Issue 1360523004: Remove CJS_RuntimeFactory (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: unique_ptr Created 5 years, 3 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/include/fsdk_mgr.h ('k') | fpdfsdk/src/fsdk_mgr.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_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
9 9
10 #include "../../../core/include/fxcrt/fx_string.h" 10 #include "../../../core/include/fxcrt/fx_string.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual void OnExternal_Exec() = 0; 126 virtual void OnExternal_Exec() = 0;
127 127
128 virtual void EnableMessageBox(FX_BOOL bEnable) = 0; 128 virtual void EnableMessageBox(FX_BOOL bEnable) = 0;
129 129
130 protected: 130 protected:
131 virtual ~IFXJS_Context() {} 131 virtual ~IFXJS_Context() {}
132 }; 132 };
133 133
134 class IFXJS_Runtime { 134 class IFXJS_Runtime {
135 public: 135 public:
136 virtual ~IFXJS_Runtime() {}
137
136 virtual IFXJS_Context* NewContext() = 0; 138 virtual IFXJS_Context* NewContext() = 0;
137 virtual void ReleaseContext(IFXJS_Context* pContext) = 0; 139 virtual void ReleaseContext(IFXJS_Context* pContext) = 0;
138 virtual IFXJS_Context* GetCurrentContext() = 0; 140 virtual IFXJS_Context* GetCurrentContext() = 0;
139
140 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; 141 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
141 virtual CPDFSDK_Document* GetReaderDocument() = 0; 142 virtual CPDFSDK_Document* GetReaderDocument() = 0;
142
143 protected:
144 virtual ~IFXJS_Runtime() {}
145 };
146
147 class CJS_RuntimeFactory {
148 public:
149 CJS_RuntimeFactory() : m_bInit(false), m_nRef(0) {}
150 ~CJS_RuntimeFactory();
151
152 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp);
153 void DeleteJSRuntime(IFXJS_Runtime* pRuntime);
154 void AddRef();
155 void Release();
156
157 private:
158 bool m_bInit;
159 int m_nRef;
160 }; 143 };
161 144
162 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ 145 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698