blob: 3edaa8d462272c35b6adbc178616023d03a3556b [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
7#include "fpdfsdk/pdfwindow/cpwl_timer_handler.h"
8
9#include "fpdfsdk/pdfwindow/cpwl_timer.h"
10#include "third_party/base/ptr_util.h"
11
12CPWL_TimerHandler::CPWL_TimerHandler() {}
13
14CPWL_TimerHandler::~CPWL_TimerHandler() {}
15
16void 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
22void CPWL_TimerHandler::EndTimer() {
23 if (m_pTimer)
24 m_pTimer->KillPWLTimer();
25}
26
27void CPWL_TimerHandler::TimerProc() {}