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

Side by Side Diff: fpdfsdk/src/fsdk_mgr.cpp

Issue 1388023003: Merge to XFA: Make the vast majority of JS headers private to src/javascript. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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/javascript/util.h ('k') | fpdfsdk/src/javascript/Consts.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 #include "../../public/fpdf_ext.h" 7 #include "../../public/fpdf_ext.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/formfiller/FFL_FormFiller.h"
9 #include "../include/fpdfxfa/fpdfxfa_app.h"
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 10 #include "../include/fpdfxfa/fpdfxfa_doc.h"
10 #include "../include/fpdfxfa/fpdfxfa_page.h" 11 #include "../include/fpdfxfa/fpdfxfa_page.h"
11 #include "../include/fpdfxfa/fpdfxfa_util.h" 12 #include "../include/fpdfxfa/fpdfxfa_util.h"
13 #include "../include/fsdk_define.h"
12 #include "../include/fsdk_mgr.h" 14 #include "../include/fsdk_mgr.h"
13 #include "../include/formfiller/FFL_FormFiller.h"
14 #include "../include/javascript/IJavaScript.h" 15 #include "../include/javascript/IJavaScript.h"
15 #include "../include/fpdfxfa/fpdfxfa_app.h"
16 #include "../include/javascript/JS_Runtime.h"
17 16
18 #if _FX_OS_ == _FX_ANDROID_ 17 #if _FX_OS_ == _FX_ANDROID_
19 #include "time.h" 18 #include "time.h"
20 #else 19 #else
21 #include <ctime> 20 #include <ctime>
22 #endif 21 #endif
23 22
24 class CFX_SystemHandler : public IFX_SystemHandler { 23 class CFX_SystemHandler : public IFX_SystemHandler {
25 public: 24 public:
26 CFX_SystemHandler(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv), m_nCharSet(-1) {} 25 CFX_SystemHandler(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv), m_nCharSet(-1) {}
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 bsBcc.ReleaseBuffer(); 373 bsBcc.ReleaseBuffer();
375 bsSubject.ReleaseBuffer(); 374 bsSubject.ReleaseBuffer();
376 bsMsg.ReleaseBuffer(); 375 bsMsg.ReleaseBuffer();
377 } 376 }
378 } 377 }
379 378
380 IFXJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { 379 IFXJS_Runtime* CPDFDoc_Environment::GetJSRuntime() {
381 if (!IsJSInitiated()) 380 if (!IsJSInitiated())
382 return NULL; 381 return NULL;
383 if (!m_pJSRuntime) 382 if (!m_pJSRuntime)
384 m_pJSRuntime.reset(new CJS_Runtime(this)); 383 m_pJSRuntime.reset(IFXJS_Runtime::Create(this));
385 return m_pJSRuntime.get(); 384 return m_pJSRuntime.get();
386 } 385 }
387 386
388 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { 387 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() {
389 if (!m_pAnnotHandlerMgr) 388 if (!m_pAnnotHandlerMgr)
390 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this); 389 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this);
391 return m_pAnnotHandlerMgr; 390 return m_pAnnotHandlerMgr;
392 } 391 }
393 392
394 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() { 393 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() {
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 if (!pFocusAnnot) 1188 if (!pFocusAnnot)
1190 return NULL; 1189 return NULL;
1191 1190
1192 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { 1191 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) {
1193 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 1192 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
1194 if (pAnnot == pFocusAnnot) 1193 if (pAnnot == pFocusAnnot)
1195 return pAnnot; 1194 return pAnnot;
1196 } 1195 }
1197 return NULL; 1196 return NULL;
1198 } 1197 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/javascript/util.h ('k') | fpdfsdk/src/javascript/Consts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698