Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 1 | // 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 Sinclair | c411eb9 | 2017-07-25 09:39:30 -0400 | [diff] [blame^] | 7 | #include "fpdfsdk/pwl/cpwl_timer_handler.h" |
Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 8 | |
Dan Sinclair | c411eb9 | 2017-07-25 09:39:30 -0400 | [diff] [blame^] | 9 | #include "fpdfsdk/pwl/cpwl_timer.h" |
Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 10 | #include "third_party/base/ptr_util.h" |
| 11 | |
| 12 | CPWL_TimerHandler::CPWL_TimerHandler() {} |
| 13 | |
| 14 | CPWL_TimerHandler::~CPWL_TimerHandler() {} |
| 15 | |
| 16 | void CPWL_TimerHandler::BeginTimer(int32_t nElapse) { |
| 17 | if (!m_pTimer) |
| 18 | m_pTimer = pdfium::MakeUnique<CPWL_Timer>(this, GetSystemHandler()); |
| 19 | m_pTimer->SetPWLTimer(nElapse); |
| 20 | } |
| 21 | |
| 22 | void CPWL_TimerHandler::EndTimer() { |
| 23 | if (m_pTimer) |
| 24 | m_pTimer->KillPWLTimer(); |
| 25 | } |
| 26 | |
| 27 | void CPWL_TimerHandler::TimerProc() {} |