| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "../../public/fpdf_ext.h" | 9 #include "../../public/fpdf_ext.h" |
| 10 #include "../../third_party/base/nonstd_unique_ptr.h" | 10 #include "../../third_party/base/nonstd_unique_ptr.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void CFX_SystemHandler::KillTimer(int32_t nID) { | 203 void CFX_SystemHandler::KillTimer(int32_t nID) { |
| 204 m_pEnv->FFI_KillTimer(nID); | 204 m_pEnv->FFI_KillTimer(nID); |
| 205 } | 205 } |
| 206 | 206 |
| 207 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() { | 207 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() { |
| 208 return m_pEnv->FFI_GetLocalTime(); | 208 return m_pEnv->FFI_GetLocalTime(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 CPDFDoc_Environment::CPDFDoc_Environment(CPDF_Document* pDoc, | 211 CPDFDoc_Environment::CPDFDoc_Environment(CPDF_Document* pDoc, |
| 212 FPDF_FORMFILLINFO* pFFinfo) | 212 FPDF_FORMFILLINFO* pFFinfo) |
| 213 : m_pInfo(pFFinfo), | 213 : m_pInfo(pFFinfo), m_pSDKDoc(NULL), m_pPDFDoc(pDoc) { |
| 214 m_pSDKDoc(NULL), | 214 m_pSysHandler.reset(new CFX_SystemHandler(this)); |
| 215 m_pPDFDoc(pDoc), | |
| 216 m_pSysHandler(new CFX_SystemHandler(this)) { | |
| 217 } | 215 } |
| 218 | 216 |
| 219 CPDFDoc_Environment::~CPDFDoc_Environment() { | 217 CPDFDoc_Environment::~CPDFDoc_Environment() { |
| 220 } | 218 } |
| 221 | 219 |
| 222 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg, | 220 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg, |
| 223 const FX_WCHAR* Title, | 221 const FX_WCHAR* Title, |
| 224 FX_UINT Type, | 222 FX_UINT Type, |
| 225 FX_UINT Icon) { | 223 FX_UINT Icon) { |
| 226 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) { | 224 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) { |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 930 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
| 933 if (!pFocusAnnot) | 931 if (!pFocusAnnot) |
| 934 return nullptr; | 932 return nullptr; |
| 935 | 933 |
| 936 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 934 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
| 937 if (pAnnot == pFocusAnnot) | 935 if (pAnnot == pFocusAnnot) |
| 938 return pAnnot; | 936 return pAnnot; |
| 939 } | 937 } |
| 940 return nullptr; | 938 return nullptr; |
| 941 } | 939 } |
| OLD | NEW |