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 |
| 21 // Returns int64 |
| 22 using talk_base::Task::get_timeout_time; |
| 23 |
| 24 // Call to set the timeout interval. |
| 25 using talk_base::Task::set_timeout_seconds; |
| 26 |
| 27 using talk_base::Task::SignalTimeout; |
| 28 |
| 29 private: |
| 30 virtual int OnTimeout(); |
| 31 virtual int ProcessStart(); |
| 32 |
| 33 bool repeat_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(Timer); |
| 36 }; |
| 37 |
| 38 } // namespace notifier |
| 39 |
| 40 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIMER_H_ |
OLD | NEW |