| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 IFX_FileAccess* Retain() override { | 47 IFX_FileAccess* Retain() override { |
| 48 m_RefCount++; | 48 m_RefCount++; |
| 49 return (IFX_FileAccess*)this; | 49 return (IFX_FileAccess*)this; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; } | 52 void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; } |
| 53 | 53 |
| 54 IFX_FileStream* CreateFileStream(uint32_t dwModes) override { | 54 IFX_FileStream* CreateFileStream(uint32_t dwModes) override { |
| 55 return FX_CreateFileStream(m_path, dwModes); | 55 return FX_CreateFileStream(m_path.c_str(), dwModes); |
| 56 } | 56 } |
| 57 | 57 |
| 58 FX_BOOL Init(const CFX_WideStringC& wsPath) { | 58 FX_BOOL Init(const CFX_WideStringC& wsPath) { |
| 59 m_path = wsPath; | 59 m_path = wsPath; |
| 60 m_RefCount = 1; | 60 m_RefCount = 1; |
| 61 return TRUE; | 61 return TRUE; |
| 62 } | 62 } |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 CFX_WideString m_path; | 65 CFX_WideString m_path; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 uint32_t mt[MT_N]; | 325 uint32_t mt[MT_N]; |
| 326 }; | 326 }; |
| 327 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 327 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 328 FX_BOOL FX_GenerateCryptoRandom(uint32_t* pBuffer, int32_t iCount); | 328 FX_BOOL FX_GenerateCryptoRandom(uint32_t* pBuffer, int32_t iCount); |
| 329 #endif | 329 #endif |
| 330 #ifdef __cplusplus | 330 #ifdef __cplusplus |
| 331 } | 331 } |
| 332 #endif | 332 #endif |
| 333 | 333 |
| 334 #endif // CORE_FXCRT_EXTENSION_H_ | 334 #endif // CORE_FXCRT_EXTENSION_H_ |
| OLD | NEW |