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

Unified Diff: core/fxcrt/extension.h

Issue 2545653003: Make more concrete stream classes private to .cpp files (Closed)
Patch Set: {} 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fxcrt/fx_extension.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/extension.h
diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h
index ca2fc3c5b70a25587e183318a3760236f50c6c79..b62f67772b3d454029bd12f38f8a07df957b804a 100644
--- a/core/fxcrt/extension.h
+++ b/core/fxcrt/extension.h
@@ -34,86 +34,6 @@ class IFXCRT_FileAccess {
virtual bool Truncate(FX_FILESIZE szFile) = 0;
};
-#ifdef PDF_ENABLE_XFA
-class CFX_CRTFileAccess : public IFX_FileAccess {
- public:
- CFX_CRTFileAccess();
- ~CFX_CRTFileAccess() override;
-
- // IFX_FileAccess
- void Release() override;
- IFX_FileAccess* Retain() override;
- void GetPath(CFX_WideString& wsPath) override;
- IFX_SeekableStream* CreateFileStream(uint32_t dwModes) override;
-
- bool Init(const CFX_WideStringC& wsPath);
-
- protected:
- CFX_WideString m_path;
- uint32_t m_RefCount;
-};
-#endif // PDF_ENABLE_XFA
-
-class CFX_CRTFileStream final : public IFX_SeekableStream {
- public:
- explicit CFX_CRTFileStream(std::unique_ptr<IFXCRT_FileAccess> pFA);
- ~CFX_CRTFileStream() override;
-
- // IFX_SeekableStream:
- IFX_SeekableStream* Retain() override;
- void Release() override;
- FX_FILESIZE GetSize() override;
- bool IsEOF() override;
- FX_FILESIZE GetPosition() override;
- bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
- size_t ReadBlock(void* buffer, size_t size) override;
- bool WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override;
- bool Flush() override;
-
- protected:
- std::unique_ptr<IFXCRT_FileAccess> m_pFile;
- uint32_t m_dwCount;
-};
-
-#define FX_MEMSTREAM_BlockSize (64 * 1024)
-#define FX_MEMSTREAM_Consecutive 0x01
-#define FX_MEMSTREAM_TakeOver 0x02
-
-class CFX_MemoryStream final : public IFX_MemoryStream {
- public:
- explicit CFX_MemoryStream(bool bConsecutive);
- CFX_MemoryStream(uint8_t* pBuffer, size_t nSize, bool bTakeOver);
- ~CFX_MemoryStream() override;
-
- // IFX_MemoryStream
- IFX_SeekableStream* Retain() override;
- void Release() override;
- FX_FILESIZE GetSize() override;
- bool IsEOF() override;
- FX_FILESIZE GetPosition() override;
- bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
- size_t ReadBlock(void* buffer, size_t size) override;
- bool WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override;
- bool Flush() override;
- bool IsConsecutive() const override;
- void EstimateSize(size_t nInitSize, size_t nGrowSize) override;
- uint8_t* GetBuffer() const override;
- void AttachBuffer(uint8_t* pBuffer,
- size_t nSize,
- bool bTakeOver = false) override;
- void DetachBuffer() override;
-
- protected:
- CFX_ArrayTemplate<uint8_t*> m_Blocks;
- uint32_t m_dwCount;
- size_t m_nTotalSize;
- size_t m_nCurSize;
- size_t m_nCurPos;
- size_t m_nGrowSize;
- uint32_t m_dwFlags;
- bool ExpandBlocks(size_t size);
-};
-
#ifdef __cplusplus
extern "C" {
#endif
« no previous file with comments | « no previous file | core/fxcrt/fx_extension.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698