| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #include "xfa/fwl/core/ifwl_timer.h" | |
| 8 | |
| 9 #include "xfa/fwl/core/ifwl_adaptertimermgr.h" | |
| 10 #include "xfa/fwl/core/ifwl_app.h" | |
| 11 #include "xfa/fwl/core/ifwl_timerinfo.h" | |
| 12 #include "xfa/fwl/core/ifwl_widget.h" | |
| 13 #include "xfa/fxfa/xfa_ffapp.h" | |
| 14 | |
| 15 IFWL_TimerInfo* IFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) { | |
| 16 const IFWL_App* pApp = m_pWidget->GetOwnerApp(); | |
| 17 if (!pApp) | |
| 18 return nullptr; | |
| 19 | |
| 20 CXFA_FFApp* pAdapterNative = pApp->GetAdapterNative(); | |
| 21 if (!pAdapterNative) | |
| 22 return nullptr; | |
| 23 | |
| 24 IFWL_AdapterTimerMgr* pAdapterTimerMgr = pAdapterNative->GetTimerMgr(); | |
| 25 if (!pAdapterTimerMgr) | |
| 26 return nullptr; | |
| 27 | |
| 28 IFWL_TimerInfo* pTimerInfo = nullptr; | |
| 29 pAdapterTimerMgr->Start(this, dwElapse, bImmediately, &pTimerInfo); | |
| 30 return pTimerInfo; | |
| 31 } | |
| OLD | NEW |