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

Side by Side Diff: fpdfsdk/include/fsdk_mgr.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 | « no previous file | fpdfsdk/include/javascript/IJavaScript.h » ('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_FSDK_MGR_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_
8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_
9 9
10 #include <map> 10 #include <map>
11 11
12 #include "../../core/include/fpdftext/fpdf_text.h" 12 #include "../../core/include/fpdftext/fpdf_text.h"
13 #include "../../public/fpdf_formfill.h" 13 #include "../../public/fpdf_formfill.h"
14 #include "../../public/fpdf_fwlevent.h" // cross platform keycode and events de fine. 14 #include "../../public/fpdf_fwlevent.h" // cross platform keycode and events de fine.
15 #include "fsdk_common.h" 15 #include "fsdk_common.h"
16 #include "fsdk_define.h" 16 #include "fsdk_define.h"
17 #include "fx_systemhandler.h" 17 #include "fx_systemhandler.h"
18 #include "fsdk_baseannot.h" 18 #include "fsdk_baseannot.h"
19 #include "fsdk_baseform.h" 19 #include "fsdk_baseform.h"
20 #include "fsdk_annothandler.h" 20 #include "fsdk_annothandler.h"
21 #include "fsdk_actionhandler.h" 21 #include "fsdk_actionhandler.h"
22 #include "javascript/IJavaScript.h" 22 #include "javascript/IJavaScript.h"
23 23
24 class CFFL_IFormFiller; 24 class CFFL_IFormFiller;
25 class CJS_RuntimeFactory;
26 class CPDFSDK_ActionHandler; 25 class CPDFSDK_ActionHandler;
27 class CPDFSDK_Annot; 26 class CPDFSDK_Annot;
28 class CPDFSDK_Document; 27 class CPDFSDK_Document;
29 class CPDFSDK_InterForm; 28 class CPDFSDK_InterForm;
30 class CPDFSDK_PageView; 29 class CPDFSDK_PageView;
31 class CPDFSDK_Widget; 30 class CPDFSDK_Widget;
32 class IFX_SystemHandler; 31 class IFX_SystemHandler;
33 32
34 class CPDFDoc_Environment final { 33 class CPDFDoc_Environment final {
35 public: 34 public:
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 sizeOfArray); 199 sizeOfArray);
201 } 200 }
202 201
203 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } 202 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; }
204 void SetSDKDocument(CPDFSDK_Document* pFXDoc) { m_pSDKDoc = pFXDoc; } 203 void SetSDKDocument(CPDFSDK_Document* pFXDoc) { m_pSDKDoc = pFXDoc; }
205 CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; } 204 CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; }
206 CPDF_Document* GetPDFDocument() const { return m_pPDFDoc; } 205 CPDF_Document* GetPDFDocument() const { return m_pPDFDoc; }
207 CFX_ByteString GetAppName() const { return ""; } 206 CFX_ByteString GetAppName() const { return ""; }
208 IFX_SystemHandler* GetSysHandler() const { return m_pSysHandler; } 207 IFX_SystemHandler* GetSysHandler() const { return m_pSysHandler; }
209 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } 208 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; }
210 CJS_RuntimeFactory* GetRuntimeFactory() const { return m_pJSRuntimeFactory; }
211 209
212 CFFL_IFormFiller* GetIFormFiller(); // Creates if not present. 210 CFFL_IFormFiller* GetIFormFiller(); // Creates if not present.
213 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. 211 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present.
214 IFXJS_Runtime* GetJSRuntime(); // Creates if not present. 212 IFXJS_Runtime* GetJSRuntime(); // Creates if not present.
215 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. 213 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present.
216 214
217 private: 215 private:
218 CPDFSDK_AnnotHandlerMgr* m_pAnnotHandlerMgr; 216 CPDFSDK_AnnotHandlerMgr* m_pAnnotHandlerMgr;
219 CPDFSDK_ActionHandler* m_pActionHandler; 217 CPDFSDK_ActionHandler* m_pActionHandler;
220 IFXJS_Runtime* m_pJSRuntime; 218 nonstd::unique_ptr<IFXJS_Runtime> m_pJSRuntime;
221 FPDF_FORMFILLINFO* const m_pInfo; 219 FPDF_FORMFILLINFO* const m_pInfo;
222 CPDFSDK_Document* m_pSDKDoc; 220 CPDFSDK_Document* m_pSDKDoc;
223 CPDF_Document* const m_pPDFDoc; 221 CPDF_Document* const m_pPDFDoc;
224 CFFL_IFormFiller* m_pIFormFiller; 222 CFFL_IFormFiller* m_pIFormFiller;
225 IFX_SystemHandler* m_pSysHandler; 223 IFX_SystemHandler* m_pSysHandler;
226 CJS_RuntimeFactory* m_pJSRuntimeFactory;
227 }; 224 };
228 225
229 class CPDFSDK_Document { 226 class CPDFSDK_Document {
230 public: 227 public:
231 CPDFSDK_Document(CPDF_Document* pDoc, CPDFDoc_Environment* pEnv); 228 CPDFSDK_Document(CPDF_Document* pDoc, CPDFDoc_Environment* pEnv);
232 ~CPDFSDK_Document(); 229 ~CPDFSDK_Document();
233 230
234 CPDFSDK_InterForm* GetInterForm(); 231 CPDFSDK_InterForm* GetInterForm();
235 CPDF_Document* GetDocument() { return m_pDoc; } 232 CPDF_Document* GetDocument() { return m_pDoc; }
236 233
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 417 }
421 418
422 if (nStartPos < m) 419 if (nStartPos < m)
423 QuickSort(nStartPos, m, bAscend, pCompare); 420 QuickSort(nStartPos, m, bAscend, pCompare);
424 if (nStopPos > m) 421 if (nStopPos > m)
425 QuickSort(m, nStopPos, bAscend, pCompare); 422 QuickSort(m, nStopPos, bAscend, pCompare);
426 } 423 }
427 }; 424 };
428 425
429 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ 426 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/IJavaScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698