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

Side by Side Diff: fpdfsdk/include/fsdk_define.h

Issue 1288393004: Merge to XFA: Use override in more classes in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: self review Created 5 years, 4 months 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 | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/include/fsdk_mgr.h » ('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 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 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_
8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_
9 9
10 #include "../../core/include/fpdfapi/fpdf_module.h" 10 #include "../../core/include/fpdfapi/fpdf_module.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) 43 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16))
44 #endif 44 #endif
45 45
46 typedef unsigned int FX_UINT; 46 typedef unsigned int FX_UINT;
47 class CRenderContext; 47 class CRenderContext;
48 class IFSDK_PAUSE_Adapter; 48 class IFSDK_PAUSE_Adapter;
49 49
50 class CPDF_CustomAccess final : public IFX_FileRead { 50 class CPDF_CustomAccess final : public IFX_FileRead {
51 public: 51 public:
52 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 52 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
53 ~CPDF_CustomAccess() {} 53 ~CPDF_CustomAccess() override {}
54
55 // IFX_FileRead
56 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
57 void Release() override { delete this; }
58 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
54 59
55 virtual CFX_ByteString GetFullPath() { return ""; } 60 virtual CFX_ByteString GetFullPath() { return ""; }
56 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
57 virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch); 61 virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch);
58 virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size); 62 virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size);
59 virtual void Release() override { delete this; }
60 virtual FX_BOOL ReadBlock(void* buffer,
61 FX_FILESIZE offset,
62 size_t size) override;
63 63
64 FPDF_FILEACCESS m_FileAccess; 64 FPDF_FILEACCESS m_FileAccess;
65 uint8_t m_Buffer[512]; 65 uint8_t m_Buffer[512];
66 FX_DWORD m_BufferOffset; 66 FX_DWORD m_BufferOffset;
67 }; 67 };
68 68
69 class CFPDF_FileStream : public IFX_FileStream { 69 class CFPDF_FileStream : public IFX_FileStream {
70 public: 70 public:
71 CFPDF_FileStream(FPDF_FILEHANDLER* pFS); 71 CFPDF_FileStream(FPDF_FILEHANDLER* pFS);
72 virtual ~CFPDF_FileStream() {} 72 virtual ~CFPDF_FileStream() {}
(...skipping 25 matching lines...) Expand all
98 int start_x, 98 int start_x,
99 int start_y, 99 int start_y,
100 int size_x, 100 int size_x,
101 int size_y, 101 int size_y,
102 int rotate, 102 int rotate,
103 int flags, 103 int flags,
104 FX_BOOL bNeedToRestore, 104 FX_BOOL bNeedToRestore,
105 IFSDK_PAUSE_Adapter* pause); 105 IFSDK_PAUSE_Adapter* pause);
106 106
107 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 107 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/include/fsdk_mgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698