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

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

Issue 370853002: pdfium: Fix all -Wdelete-non-virtual-dtor violations on Mac. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 6 years, 5 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 | « core/src/fxge/apple/apple_int.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_DEFINE_H 7 #ifndef _FPDFSDK_DEFINE_H
8 #define _FPDFSDK_DEFINE_H 8 #define _FPDFSDK_DEFINE_H
9 9
10 #ifdef _WIN32 10 #ifdef _WIN32
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 #ifndef FX_COLORREFTOARGB 95 #ifndef FX_COLORREFTOARGB
96 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */ 96 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */
97 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) 97 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16))
98 #endif 98 #endif
99 99
100 typedef unsigned int FX_UINT; 100 typedef unsigned int FX_UINT;
101 101
102 #include "fpdfview.h" 102 #include "fpdfview.h"
103 103
104 class CPDF_CustomAccess : public IFX_FileRead, public CFX_Object 104 class CPDF_CustomAccess FX_FINAL : public IFX_FileRead, public CFX_Object
105 { 105 {
106 public: 106 public:
107 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 107 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
108 ~CPDF_CustomAccess() {} 108 ~CPDF_CustomAccess() {}
109 109
110 virtual CFX_ByteString GetFullPath() { return ""; } 110 virtual CFX_ByteString GetFullPath() { return ""; }
111 virtual FX_FILESIZE GetSize() { return m_FileAccess.m_FileLen; } 111 virtual FX_FILESIZE GetSize() { return m_FileAccess.m_FileLen; }
112 112
113 virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch); 113 virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch);
114 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size); 114 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
115 virtual void Release() { delete this; } 115 virtual void Release() { delete this; }
116 116
117 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size); 117 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size);
118 118
119 FPDF_FILEACCESS m_FileAccess; 119 FPDF_FILEACCESS m_FileAccess;
120 FX_BYTE m_Buffer[512]; 120 FX_BYTE m_Buffer[512];
121 FX_DWORD m_BufferOffset; 121 FX_DWORD m_BufferOffset;
122 }; 122 };
123 123
124 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); 124 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
125 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); 125 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
126 126
127 127
128 #endif//_FPDFSDK_DEFINE_H 128 #endif//_FPDFSDK_DEFINE_H
OLDNEW
« no previous file with comments | « core/src/fxge/apple/apple_int.h ('k') | fpdfsdk/include/fsdk_mgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698