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

Side by Side Diff: fpdfsdk/cpdfsdk_formfillenvironment.cpp

Issue 2549573003: Make concrete stream classes private to .cpp, part 4. (Closed)
Patch Set: rebase Created 4 years 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 | « no previous file | fpdfsdk/fpdfview.cpp » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cpdfsdk_formfillenvironment.h" 7 #include "fpdfsdk/cpdfsdk_formfillenvironment.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 const FX_WCHAR* url) { 466 const FX_WCHAR* url) {
467 if (!m_pInfo || !m_pInfo->FFI_DownloadFromURL) 467 if (!m_pInfo || !m_pInfo->FFI_DownloadFromURL)
468 return nullptr; 468 return nullptr;
469 469
470 CFX_ByteString bstrURL = CFX_WideString(url).UTF16LE_Encode(); 470 CFX_ByteString bstrURL = CFX_WideString(url).UTF16LE_Encode();
471 FPDF_WIDESTRING wsURL = 471 FPDF_WIDESTRING wsURL =
472 (FPDF_WIDESTRING)bstrURL.GetBuffer(bstrURL.GetLength()); 472 (FPDF_WIDESTRING)bstrURL.GetBuffer(bstrURL.GetLength());
473 473
474 FPDF_LPFILEHANDLER fileHandler = m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL); 474 FPDF_LPFILEHANDLER fileHandler = m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL);
475 475
476 return new CFPDF_FileStream(fileHandler); 476 return MakeSeekableStream(fileHandler);
477 } 477 }
478 478
479 CFX_WideString CPDFSDK_FormFillEnvironment::PostRequestURL( 479 CFX_WideString CPDFSDK_FormFillEnvironment::PostRequestURL(
480 const FX_WCHAR* wsURL, 480 const FX_WCHAR* wsURL,
481 const FX_WCHAR* wsData, 481 const FX_WCHAR* wsData,
482 const FX_WCHAR* wsContentType, 482 const FX_WCHAR* wsContentType,
483 const FX_WCHAR* wsEncode, 483 const FX_WCHAR* wsEncode,
484 const FX_WCHAR* wsHeader) { 484 const FX_WCHAR* wsHeader) {
485 if (!m_pInfo || !m_pInfo->FFI_PostRequestURL) 485 if (!m_pInfo || !m_pInfo->FFI_PostRequestURL)
486 return L""; 486 return L"";
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } else { 753 } else {
754 m_pFocusAnnot.Reset(pFocusAnnot.Get()); 754 m_pFocusAnnot.Reset(pFocusAnnot.Get());
755 } 755 }
756 } 756 }
757 return false; 757 return false;
758 } 758 }
759 759
760 bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) { 760 bool CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) {
761 return !!(GetPDFDocument()->GetUserPermissions() & nFlag); 761 return !!(GetPDFDocument()->GetUserPermissions() & nFlag);
762 } 762 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698