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

Side by Side Diff: core/fpdfapi/parser/cpdf_stream.h

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month 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 | « core/fpdfapi/parser/cpdf_security_handler.cpp ('k') | core/fpdfapi/parser/cpdf_stream.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 #ifndef CORE_FPDFAPI_PARSER_CPDF_STREAM_H_ 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_STREAM_H_
8 #define CORE_FPDFAPI_PARSER_CPDF_STREAM_H_ 8 #define CORE_FPDFAPI_PARSER_CPDF_STREAM_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 uint32_t GetRawSize() const { return m_dwSize; } 33 uint32_t GetRawSize() const { return m_dwSize; }
34 uint8_t* GetRawData() const { return m_pDataBuf.get(); } 34 uint8_t* GetRawData() const { return m_pDataBuf.get(); }
35 35
36 // Does not takes onwership of |pData|, copies into internally-owned buffer. 36 // Does not takes onwership of |pData|, copies into internally-owned buffer.
37 void SetData(const uint8_t* pData, uint32_t size); 37 void SetData(const uint8_t* pData, uint32_t size);
38 38
39 void InitStream(const uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict); 39 void InitStream(const uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict);
40 void InitStreamFromFile(IFX_SeekableReadStream* pFile, 40 void InitStreamFromFile(IFX_SeekableReadStream* pFile,
41 CPDF_Dictionary* pDict); 41 CPDF_Dictionary* pDict);
42 42
43 FX_BOOL ReadRawData(FX_FILESIZE start_pos, 43 bool ReadRawData(FX_FILESIZE start_pos,
44 uint8_t* pBuf, 44 uint8_t* pBuf,
45 uint32_t buf_size) const; 45 uint32_t buf_size) const;
46 46
47 bool IsMemoryBased() const { return m_bMemoryBased; } 47 bool IsMemoryBased() const { return m_bMemoryBased; }
48 48
49 protected: 49 protected:
50 ~CPDF_Stream() override; 50 ~CPDF_Stream() override;
51 CPDF_Object* CloneNonCyclic( 51 CPDF_Object* CloneNonCyclic(
52 bool bDirect, 52 bool bDirect,
53 std::set<const CPDF_Object*>* pVisited) const override; 53 std::set<const CPDF_Object*>* pVisited) const override;
54 54
55 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> m_pDict; 55 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> m_pDict;
(...skipping 15 matching lines...) Expand all
71 71
72 inline UniqueStream ToStream(UniqueObject obj) { 72 inline UniqueStream ToStream(UniqueObject obj) {
73 CPDF_Stream* pStream = ToStream(obj.get()); 73 CPDF_Stream* pStream = ToStream(obj.get());
74 if (!pStream) 74 if (!pStream)
75 return nullptr; 75 return nullptr;
76 obj.release(); 76 obj.release();
77 return UniqueStream(pStream); 77 return UniqueStream(pStream);
78 } 78 }
79 79
80 #endif // CORE_FPDFAPI_PARSER_CPDF_STREAM_H_ 80 #endif // CORE_FPDFAPI_PARSER_CPDF_STREAM_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_security_handler.cpp ('k') | core/fpdfapi/parser/cpdf_stream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698