OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 The Chromium 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 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIMER_H_ | |
6 #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIMER_H_ | |
7 | |
8 #include "talk/base/task.h" | |
9 | |
10 namespace notifier { | |
11 | |
12 class Timer : private talk_base::Task { | |
13 public: | |
14 Timer(talk_base::Task* parent, int timeout_seconds, bool repeat); | |
15 ~Timer(); | |
16 | |
17 // Call Abort() to stop the timer. | |
18 using talk_base::Task::Abort; | |
19 | |
20 // Call to find out when the timer is set to go off. Returns int64. | |
21 using talk_base::Task::get_timeout_time; | |
22 | |
23 // Call to set the timeout interval. | |
24 using talk_base::Task::set_timeout_seconds; | |
25 | |
26 using talk_base::Task::SignalTimeout; | |
27 | |
28 private: | |
29 virtual int OnTimeout(); | |
30 virtual int ProcessStart(); | |
31 | |
32 bool repeat_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(Timer); | |
35 }; | |
36 | |
37 } // namespace notifier | |
38 | |
39 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIMER_H_ | |
OLD | NEW |