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_FWL_THREADIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_THREADIMP_H_ |
8 #define XFA_FWL_CORE_FWL_THREADIMP_H_ | 8 #define XFA_FWL_CORE_FWL_THREADIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/fwl_noteimp.h" | |
10 #include "xfa/fwl/core/ifwl_thread.h" | 11 #include "xfa/fwl/core/ifwl_thread.h" |
11 | 12 |
12 class CFWL_NoteDriver; | |
13 class IFWL_NoteDriver; | 13 class IFWL_NoteDriver; |
14 class IFWL_NoteThread; | 14 class IFWL_NoteThread; |
15 | 15 |
16 class CFWL_ThreadImp { | 16 class CFWL_ThreadImp { |
17 public: | 17 public: |
18 CFWL_ThreadImp(IFWL_Thread* pIface) | |
19 : m_pNoteDriver(new CFWL_NoteDriver), m_pIface(pIface) {} | |
18 virtual ~CFWL_ThreadImp() {} | 20 virtual ~CFWL_ThreadImp() {} |
Tom Sepez
2016/04/14 16:01:59
so do we just leak the m_pNoteDriver ???
dsinclair
2016/04/14 16:52:53
Done. Nice catch.
| |
21 | |
19 IFWL_Thread* GetInterface() const { return m_pIface; } | 22 IFWL_Thread* GetInterface() const { return m_pIface; } |
23 IFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver; } | |
20 | 24 |
21 protected: | 25 protected: |
22 CFWL_ThreadImp(IFWL_Thread* pIface) : m_pIface(pIface) {} | 26 CFWL_NoteDriver* const m_pNoteDriver; |
23 | 27 |
24 private: | 28 private: |
25 IFWL_Thread* const m_pIface; | 29 IFWL_Thread* const m_pIface; |
26 }; | 30 }; |
27 | 31 |
28 class CFWL_NoteThreadImp : public CFWL_ThreadImp { | |
29 public: | |
30 CFWL_NoteThreadImp(IFWL_NoteThread* pIface); | |
31 virtual ~CFWL_NoteThreadImp(); | |
32 | |
33 virtual IFWL_NoteDriver* GetNoteDriver(); | |
34 | |
35 protected: | |
36 CFWL_NoteDriver* const m_pNoteDriver; | |
37 }; | |
38 | |
39 #endif // XFA_FWL_CORE_FWL_THREADIMP_H_ | 32 #endif // XFA_FWL_CORE_FWL_THREADIMP_H_ |
OLD | NEW |