| 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 "fpdfsdk/fpdfxfa/cpdfxfa_context.h" | 7 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 pBuff[nLength] = 0; | 321 pBuff[nLength] = 0; |
| 322 pBuff[nLength + 1] = 0; | 322 pBuff[nLength + 1] = 0; |
| 323 wsAnswer = CFX_WideString::FromUTF16LE( | 323 wsAnswer = CFX_WideString::FromUTF16LE( |
| 324 reinterpret_cast<const unsigned short*>(pBuff), | 324 reinterpret_cast<const unsigned short*>(pBuff), |
| 325 nLength / sizeof(unsigned short)); | 325 nLength / sizeof(unsigned short)); |
| 326 } | 326 } |
| 327 delete[] pBuff; | 327 delete[] pBuff; |
| 328 return wsAnswer; | 328 return wsAnswer; |
| 329 } | 329 } |
| 330 | 330 |
| 331 IFX_SeekableReadStream* CPDFXFA_Context::DownloadURL( | 331 CFX_RetainPtr<IFX_SeekableReadStream> CPDFXFA_Context::DownloadURL( |
| 332 const CFX_WideString& wsURL) { | 332 const CFX_WideString& wsURL) { |
| 333 return m_pFormFillEnv ? m_pFormFillEnv->DownloadFromURL(wsURL.c_str()) | 333 return m_pFormFillEnv ? m_pFormFillEnv->DownloadFromURL(wsURL.c_str()) |
| 334 : nullptr; | 334 : nullptr; |
| 335 } | 335 } |
| 336 | 336 |
| 337 bool CPDFXFA_Context::PostRequestURL(const CFX_WideString& wsURL, | 337 bool CPDFXFA_Context::PostRequestURL(const CFX_WideString& wsURL, |
| 338 const CFX_WideString& wsData, | 338 const CFX_WideString& wsData, |
| 339 const CFX_WideString& wsContentType, | 339 const CFX_WideString& wsContentType, |
| 340 const CFX_WideString& wsEncode, | 340 const CFX_WideString& wsEncode, |
| 341 const CFX_WideString& wsHeader, | 341 const CFX_WideString& wsHeader, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 return; | 453 return; |
| 454 } | 454 } |
| 455 } | 455 } |
| 456 | 456 |
| 457 IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() { | 457 IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() { |
| 458 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; | 458 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; |
| 459 if (m_pFormFillEnv) | 459 if (m_pFormFillEnv) |
| 460 pAdapter = new CXFA_FWLAdapterTimerMgr(m_pFormFillEnv); | 460 pAdapter = new CXFA_FWLAdapterTimerMgr(m_pFormFillEnv); |
| 461 return pAdapter; | 461 return pAdapter; |
| 462 } | 462 } |
| OLD | NEW |