Index: pdf/timer.h |
diff --git a/pdf/timer.h b/pdf/timer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..525f069c2a1253b4b1eda22d48aa9a70bc0fa6ed |
--- /dev/null |
+++ b/pdf/timer.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef PDF_TIMER_H_ |
+#define PDF_TIMER_H_ |
+ |
+#include <set> |
Lei Zhang
2016/10/25 18:24:52
Not used.
snake
2016/10/25 19:16:27
Done.
|
+ |
+#include "base/macros.h" |
+#include "ppapi/utility/completion_callback_factory.h" |
+ |
+namespace chrome_pdf { |
+ |
+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.
|
+ public: |
+ 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.
|
+ virtual ~Timer(); |
+ |
+ virtual void OnTimer() = 0; |
+ |
+ private: |
+ 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.
|
+ void PostCallback(); |
+ void TimerProc(int32_t result); |
+ |
+ int delay_; |
+ pp::CompletionCallbackFactory<Timer> callback_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(Timer); |
+}; |
+ |
+} // namespace chrome_pdf |
+ |
+#endif // PDF_TIMER_H_ |