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

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

Issue 1391843004: Add some preprocessor directives to allow compiling without V8. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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/src/fpdfview.cpp ('k') | samples/pdfium_test.cc » ('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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { 372 IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() {
373 #ifdef DISABLE_V8
374 return NULL;
375 #else
373 if (!IsJSInitiated()) 376 if (!IsJSInitiated())
374 return NULL; 377 return NULL;
375 if (!m_pJSRuntime) 378 if (!m_pJSRuntime)
376 m_pJSRuntime.reset(IJS_Runtime::Create(this)); 379 m_pJSRuntime.reset(IJS_Runtime::Create(this));
377 return m_pJSRuntime.get(); 380 return m_pJSRuntime.get();
381 #endif // DISABLE_V8
378 } 382 }
379 383
380 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { 384 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() {
381 if (!m_pAnnotHandlerMgr) 385 if (!m_pAnnotHandlerMgr)
382 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this); 386 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this);
383 return m_pAnnotHandlerMgr; 387 return m_pAnnotHandlerMgr;
384 } 388 }
385 389
386 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() { 390 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() {
387 if (!m_pActionHandler) 391 if (!m_pActionHandler)
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 if (!pFocusAnnot) 991 if (!pFocusAnnot)
988 return NULL; 992 return NULL;
989 993
990 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { 994 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) {
991 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 995 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
992 if (pAnnot == pFocusAnnot) 996 if (pAnnot == pFocusAnnot)
993 return pAnnot; 997 return pAnnot;
994 } 998 }
995 return NULL; 999 return NULL;
996 } 1000 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | samples/pdfium_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698