| 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 #include "xfa/fwl/core/fwl_threadimp.h" | 7 #include "xfa/fwl/core/fwl_threadimp.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/fwl_appimp.h" | 9 #include "xfa/fwl/core/fwl_appimp.h" |
| 10 #include "xfa/fwl/core/fwl_noteimp.h" | 10 #include "xfa/fwl/core/fwl_noteimp.h" |
| 11 #include "xfa/fwl/core/fwl_targetimp.h" | 11 #include "xfa/fwl/core/fwl_targetimp.h" |
| 12 #include "xfa/fwl/core/ifwl_notethread.h" | 12 #include "xfa/fwl/core/ifwl_notethread.h" |
| 13 | 13 |
| 14 void IFWL_Thread::Release() { | 14 void IFWL_Thread::Release() { |
| 15 delete m_pImpl; | 15 delete m_pImpl; |
| 16 } | 16 } |
| 17 FWL_ERR IFWL_Thread::Run(FWL_HTHREAD hThread) { | 17 |
| 18 return m_pImpl->Run(hThread); | |
| 19 } | |
| 20 IFWL_NoteDriver* IFWL_NoteThread::GetNoteDriver() { | 18 IFWL_NoteDriver* IFWL_NoteThread::GetNoteDriver() { |
| 21 return static_cast<CFWL_NoteThreadImp*>(GetImpl())->GetNoteDriver(); | 19 return static_cast<CFWL_NoteThreadImp*>(GetImpl())->GetNoteDriver(); |
| 22 } | 20 } |
| 23 | 21 |
| 24 FWL_ERR CFWL_ThreadImp::Run(FWL_HTHREAD hThread) { | |
| 25 return FWL_ERR_Succeeded; | |
| 26 } | |
| 27 CFWL_NoteThreadImp::CFWL_NoteThreadImp(IFWL_NoteThread* pIface) | 22 CFWL_NoteThreadImp::CFWL_NoteThreadImp(IFWL_NoteThread* pIface) |
| 28 : CFWL_ThreadImp(pIface), m_pNoteDriver(new CFWL_NoteDriver) {} | 23 : CFWL_ThreadImp(pIface), m_pNoteDriver(new CFWL_NoteDriver) {} |
| 24 |
| 29 CFWL_NoteThreadImp::~CFWL_NoteThreadImp() { | 25 CFWL_NoteThreadImp::~CFWL_NoteThreadImp() { |
| 30 delete m_pNoteDriver; | 26 delete m_pNoteDriver; |
| 31 } | 27 } |
| 32 FWL_ERR CFWL_NoteThreadImp::Run(FWL_HTHREAD hThread) { | 28 |
| 33 if (!m_pNoteDriver) | |
| 34 return FWL_ERR_Indefinite; | |
| 35 return m_pNoteDriver->Run(); | |
| 36 } | |
| 37 IFWL_NoteDriver* CFWL_NoteThreadImp::GetNoteDriver() { | 29 IFWL_NoteDriver* CFWL_NoteThreadImp::GetNoteDriver() { |
| 38 return m_pNoteDriver; | 30 return m_pNoteDriver; |
| 39 } | 31 } |
| OLD | NEW |