| OLD | NEW |
| 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 CORE_FXCRT_EXTENSION_H_ | 7 #ifndef CORE_FXCRT_EXTENSION_H_ |
| 8 #define CORE_FXCRT_EXTENSION_H_ | 8 #define CORE_FXCRT_EXTENSION_H_ |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 CFX_CRTFileAccess() : m_RefCount(0) {} | 40 CFX_CRTFileAccess() : m_RefCount(0) {} |
| 41 | 41 |
| 42 // IFX_FileAccess | 42 // IFX_FileAccess |
| 43 void Release() override { | 43 void Release() override { |
| 44 if (--m_RefCount == 0) | 44 if (--m_RefCount == 0) |
| 45 delete this; | 45 delete this; |
| 46 } | 46 } |
| 47 | 47 |
| 48 IFX_FileAccess* Retain() override { | 48 IFX_FileAccess* Retain() override { |
| 49 m_RefCount++; | 49 m_RefCount++; |
| 50 return (IFX_FileAccess*)this; | 50 return this; |
| 51 } | 51 } |
| 52 | 52 |
| 53 void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; } | 53 void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; } |
| 54 | 54 |
| 55 IFX_FileStream* CreateFileStream(uint32_t dwModes) override { | 55 IFX_FileStream* CreateFileStream(uint32_t dwModes) override { |
| 56 return FX_CreateFileStream(m_path.c_str(), dwModes); | 56 return FX_CreateFileStream(m_path.c_str(), dwModes); |
| 57 } | 57 } |
| 58 | 58 |
| 59 FX_BOOL Init(const CFX_WideStringC& wsPath) { | 59 FX_BOOL Init(const CFX_WideStringC& wsPath) { |
| 60 m_path = wsPath; | 60 m_path = wsPath; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 uint32_t mt[MT_N]; | 326 uint32_t mt[MT_N]; |
| 327 }; | 327 }; |
| 328 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 328 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 329 FX_BOOL FX_GenerateCryptoRandom(uint32_t* pBuffer, int32_t iCount); | 329 FX_BOOL FX_GenerateCryptoRandom(uint32_t* pBuffer, int32_t iCount); |
| 330 #endif | 330 #endif |
| 331 #ifdef __cplusplus | 331 #ifdef __cplusplus |
| 332 } | 332 } |
| 333 #endif | 333 #endif |
| 334 | 334 |
| 335 #endif // CORE_FXCRT_EXTENSION_H_ | 335 #endif // CORE_FXCRT_EXTENSION_H_ |
| OLD | NEW |