OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 PDF_TIMER_H_ | |
6 #define PDF_TIMER_H_ | |
7 | |
8 #include <set> | |
Lei Zhang
2016/10/25 18:24:52
Not used.
snake
2016/10/25 19:16:27
Done.
| |
9 | |
10 #include "base/macros.h" | |
11 #include "ppapi/utility/completion_callback_factory.h" | |
12 | |
13 namespace chrome_pdf { | |
14 | |
15 class Timer { | |
Lei Zhang
2016/10/25 18:24:52
Please add a description for this class. Looks lik
snake
2016/10/25 19:16:27
Done.
| |
16 public: | |
17 explicit Timer(int delay); | |
Lei Zhang
2016/10/25 18:24:52
What unit is |delay| in? Rename to "delay_in_milli
snake
2016/10/25 19:16:27
Done.
| |
18 virtual ~Timer(); | |
19 | |
20 virtual void OnTimer() = 0; | |
21 | |
22 private: | |
23 friend class TestTimerRunner; | |
Lei Zhang
2016/10/25 18:24:52
Add this in the next CL.
snake
2016/10/25 19:16:27
Done.
| |
24 void PostCallback(); | |
25 void TimerProc(int32_t result); | |
26 | |
27 int delay_; | |
28 pp::CompletionCallbackFactory<Timer> callback_factory_; | |
29 | |
30 DISALLOW_COPY_AND_ASSIGN(Timer); | |
31 }; | |
32 | |
33 } // namespace chrome_pdf | |
34 | |
35 #endif // PDF_TIMER_H_ | |
OLD | NEW |