blob: 6e082abd4bbb42c739785cf3a57ef234c2141799 [file] [log] [blame]
Lei Zhangfac46f82017-06-02 14:20:04 -07001// Copyright 2017 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
Dan Sinclairc411eb92017-07-25 09:39:30 -04007#ifndef FPDFSDK_PWL_CPWL_TIMER_H_
8#define FPDFSDK_PWL_CPWL_TIMER_H_
Lei Zhangfac46f82017-06-02 14:20:04 -07009
Dan Sinclairaee0db02017-09-21 16:53:58 -040010#include "core/fxcrt/unowned_ptr.h"
Lei Zhangfac46f82017-06-02 14:20:04 -070011
12class CFX_SystemHandler;
13class CPWL_TimerHandler;
14
15class CPWL_Timer {
16 public:
17 CPWL_Timer(CPWL_TimerHandler* pAttached, CFX_SystemHandler* pSystemHandler);
18 virtual ~CPWL_Timer();
19
20 static void TimerProc(int32_t idEvent);
21
22 int32_t SetPWLTimer(int32_t nElapse);
23 void KillPWLTimer();
24
25 private:
26 int32_t m_nTimerID;
Dan Sinclairaee0db02017-09-21 16:53:58 -040027 UnownedPtr<CPWL_TimerHandler> m_pAttached;
28 UnownedPtr<CFX_SystemHandler> m_pSystemHandler;
Lei Zhangfac46f82017-06-02 14:20:04 -070029};
30
Dan Sinclairc411eb92017-07-25 09:39:30 -040031#endif // FPDFSDK_PWL_CPWL_TIMER_H_