Chromium Code Reviews| 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 XFA_FWL_CORE_IFWL_THREAD_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_THREAD_H_ |
| 8 #define XFA_FWL_CORE_IFWL_THREAD_H_ | 8 #define XFA_FWL_CORE_IFWL_THREAD_H_ |
| 9 | 9 |
| 10 // The FWL thread/app code contains three parallel inheritance hierarchies, | 10 // The FWL thread/app code contains three parallel inheritance hierarchies, |
| 11 // which reference each other via pointers as follows: | 11 // which reference each other via pointers as follows: |
| 12 // | 12 // |
| 13 // m_pImpl | 13 // m_pImpl |
| 14 // (nonesuch) IFWL_Thread ----------> CFWL_ThreadImp | 14 // (nonesuch) IFWL_Thread ----------> CFWL_ThreadImp |
| 15 // | <---------- | | 15 // | <---------- | |
| 16 // A m_pIface A | 16 // A m_pIface A |
| 17 // | | | |
| 18 // (nonesuch) IFWL_NoteThread CFWL_NoteThreadImp | |
| 19 // | | | |
| 20 // A A | |
| 21 // m_pIface | | | 17 // m_pIface | | |
| 22 // CFWL_App --------------> IFWL_App CFWL_AppImp | 18 // CFWL_App --------------> IFWL_App CFWL_AppImp |
| 23 // | 19 // |
| 24 | 20 |
| 25 #include "xfa/fwl/core/fwl_error.h" | 21 #include "xfa/fwl/core/fwl_error.h" |
| 26 | 22 |
| 27 class CFWL_ThreadImp; | 23 class CFWL_ThreadImp; |
| 28 class IFWL_NoteDriver; | 24 class IFWL_NoteDriver; |
| 29 | 25 |
| 30 class IFWL_Thread { | 26 class IFWL_Thread { |
| 31 public: | 27 public: |
| 32 // These call into polymorphic methods in the impl; no need to override. | 28 // These call into polymorphic methods in the impl; no need to override. |
| 33 void Release(); | 29 void Release(); |
| 34 | 30 |
| 35 CFWL_ThreadImp* GetImpl() const { return m_pImpl; } | 31 CFWL_ThreadImp* GetImpl() const { return m_pImpl; } |
| 36 void SetImpl(CFWL_ThreadImp* pImpl) { m_pImpl = pImpl; } | 32 void SetImpl(CFWL_ThreadImp* pImpl) { m_pImpl = pImpl; } |
| 37 | 33 |
| 34 IFWL_NoteDriver* GetNoteDriver(); | |
|
Tom Sepez
2016/04/13 21:45:29
is this a const method?
dsinclair
2016/04/14 13:23:35
Looks like it can be. Done.
| |
| 35 | |
| 38 protected: | 36 protected: |
| 39 virtual ~IFWL_Thread() {} | 37 virtual ~IFWL_Thread() {} |
| 40 | 38 |
| 41 private: | 39 private: |
| 42 CFWL_ThreadImp* m_pImpl; | 40 CFWL_ThreadImp* m_pImpl; |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 #endif // XFA_FWL_CORE_IFWL_THREAD_H_ | 43 #endif // XFA_FWL_CORE_IFWL_THREAD_H_ |
| OLD | NEW |