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

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

Issue 1386173002: Rename IFXJS_Runtime and IFXJS_Context to IJS_. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Comment in fxjs_v8.h 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/src/fsdk_baseform.cpp ('k') | fpdfsdk/src/javascript/Document.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 "../../third_party/base/nonstd_unique_ptr.h" 8 #include "../../third_party/base/nonstd_unique_ptr.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 #include "../include/fsdk_mgr.h" 10 #include "../include/fsdk_mgr.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, 362 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length,
363 bUI, pTo, pSubject, pCC, pBcc, pMsg); 363 bUI, pTo, pSubject, pCC, pBcc, pMsg);
364 bsTo.ReleaseBuffer(); 364 bsTo.ReleaseBuffer();
365 bsCC.ReleaseBuffer(); 365 bsCC.ReleaseBuffer();
366 bsBcc.ReleaseBuffer(); 366 bsBcc.ReleaseBuffer();
367 bsSubject.ReleaseBuffer(); 367 bsSubject.ReleaseBuffer();
368 bsMsg.ReleaseBuffer(); 368 bsMsg.ReleaseBuffer();
369 } 369 }
370 } 370 }
371 371
372 IFXJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { 372 IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() {
373 if (!IsJSInitiated()) 373 if (!IsJSInitiated())
374 return NULL; 374 return NULL;
375 if (!m_pJSRuntime) 375 if (!m_pJSRuntime)
376 m_pJSRuntime.reset(IFXJS_Runtime::Create(this)); 376 m_pJSRuntime.reset(IJS_Runtime::Create(this));
377 return m_pJSRuntime.get(); 377 return m_pJSRuntime.get();
378 } 378 }
379 379
380 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { 380 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() {
381 if (!m_pAnnotHandlerMgr) 381 if (!m_pAnnotHandlerMgr)
382 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this); 382 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this);
383 return m_pAnnotHandlerMgr; 383 return m_pAnnotHandlerMgr;
384 } 384 }
385 385
386 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() { 386 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 void CPDFSDK_Document::OnCloseDocument() { 587 void CPDFSDK_Document::OnCloseDocument() {
588 KillFocusAnnot(); 588 KillFocusAnnot();
589 } 589 }
590 590
591 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) { 591 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) {
592 FX_DWORD dwPermissions = m_pDoc->GetUserPermissions(); 592 FX_DWORD dwPermissions = m_pDoc->GetUserPermissions();
593 return dwPermissions & nFlag; 593 return dwPermissions & nFlag;
594 } 594 }
595 595
596 IFXJS_Runtime* CPDFSDK_Document::GetJsRuntime() { 596 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() {
597 ASSERT(m_pEnv != NULL); 597 ASSERT(m_pEnv != NULL);
598 return m_pEnv->GetJSRuntime(); 598 return m_pEnv->GetJSRuntime();
599 } 599 }
600 600
601 CFX_WideString CPDFSDK_Document::GetPath() { 601 CFX_WideString CPDFSDK_Document::GetPath() {
602 ASSERT(m_pEnv != NULL); 602 ASSERT(m_pEnv != NULL);
603 return m_pEnv->JS_docGetFilePath(); 603 return m_pEnv->JS_docGetFilePath();
604 } 604 }
605 605
606 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDF_Page* page) 606 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDF_Page* page)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 if (!pFocusAnnot) 987 if (!pFocusAnnot)
988 return NULL; 988 return NULL;
989 989
990 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { 990 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) {
991 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 991 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
992 if (pAnnot == pFocusAnnot) 992 if (pAnnot == pFocusAnnot)
993 return pAnnot; 993 return pAnnot;
994 } 994 }
995 return NULL; 995 return NULL;
996 } 996 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | fpdfsdk/src/javascript/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698